Bump Ruff to 0.7.3

This commit is contained in:
Adam Turner
2024-11-14 16:40:34 +00:00
parent e299d69e14
commit efc36ac38f
6 changed files with 27 additions and 31 deletions

View File

@@ -82,7 +82,7 @@ docs = [
]
lint = [
"flake8>=6.0",
"ruff==0.7.2",
"ruff==0.7.3",
"mypy==1.13.0",
"sphinx-lint>=0.9",
"types-colorama==0.4.15.20240311",

View File

@@ -6,19 +6,17 @@ import snowballstemmer
from sphinx.search import SearchLanguage
english_stopwords = set(
"""
a and are as at
be but by
for
if in into is it
near no not
of on or
such
that the their then there these they this to
was will with
""".split()
)
english_stopwords = {
'a', 'and', 'are', 'as', 'at',
'be', 'but', 'by',
'for',
'if', 'in', 'into', 'is', 'it',
'near', 'no', 'not',
'of', 'on', 'or',
'such',
'that', 'the', 'their', 'then', 'there', 'these', 'they', 'this', 'to',
'was', 'will', 'with',
} # fmt: skip
js_porter_stemmer = """
/**

View File

@@ -18,19 +18,17 @@ except ImportError:
JIEBA = False
JIEBA_DEFAULT_DICT = Path()
english_stopwords = set(
"""
a and are as at
be but by
for
if in into is it
near no not
of on or
such
that the their then there these they this to
was will with
""".split()
)
english_stopwords = {
'a', 'and', 'are', 'as', 'at',
'be', 'but', 'by',
'for',
'if', 'in', 'into', 'is', 'it',
'near', 'no', 'not',
'of', 'on', 'or',
'such',
'that', 'the', 'their', 'then', 'there', 'these', 'they', 'this', 'to',
'was', 'will', 'with',
} # fmt: skip
js_porter_stemmer = """
/**

View File

@@ -32,7 +32,7 @@ def getumask() -> int:
UMASK = getumask()
class path(str):
class path(str): # NoQA: FURB189
"""
Represents a path which behaves like a string.
"""

View File

@@ -216,7 +216,7 @@ def test_format_signature(app):
assert formatsig('class', 'C', C, None, None) == '(a, b=None)'
assert formatsig('class', 'C', D, 'a, b', 'X') == '(a, b) -> X'
class ListSubclass(list):
class ListSubclass(list): # NoQA: FURB189
pass
# only supported if the python implementation decides to document it
@@ -1527,7 +1527,7 @@ class _EnumFormatter:
tab = ' ' * 3
def rst_option(name: str, value: Any) -> str:
value = '' if value in {1, True} else value
value = '' if value == 1 else value # note True == 1.
return f'{prefix}{tab}:{name}: {value!s}'.rstrip()
lines = [

View File

@@ -41,7 +41,7 @@ if TYPE_CHECKING:
from typing import NoReturn
class FakeList(list):
class FakeList(list): # NoQA: FURB189
def __iter__(self) -> NoReturn:
raise NotImplementedError