mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Bump Ruff to 0.7.3
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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 = """
|
||||
/**
|
||||
|
||||
@@ -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 = """
|
||||
/**
|
||||
|
||||
@@ -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.
|
||||
"""
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user