mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-25 14:40:22 -05:00
Bump Ruff to 0.9.7
This commit is contained in:
1 parent
7ba762870f
commit
d847d736ec
7 files changed
+8
-8
No files matched your search
+1
-1
@@ -92,7 +92,7 @@ docs = [
|
||||
"sphinxcontrib-websupport",
|
||||
]
|
||||
lint = [
|
||||
"ruff==0.9.6",
|
||||
"ruff==0.9.7",
|
||||
"mypy==1.15.0",
|
||||
"sphinx-lint>=0.9",
|
||||
"types-colorama==0.4.15.20240311",
|
||||
|
||||
@@ -291,7 +291,7 @@ def between(
|
||||
# This class is used only in ``sphinx.ext.autodoc.directive``,
|
||||
# But we define this class here to keep compatibility
|
||||
# See: https://github.com/sphinx-doc/sphinx/issues/4538
|
||||
class Options(dict[str, Any]):
|
||||
class Options(dict[str, Any]): # NoQA: FURB189
|
||||
"""A dict/attribute hybrid that returns None on nonexisting keys."""
|
||||
|
||||
def copy(self) -> Options:
|
||||
|
||||
@@ -52,7 +52,7 @@ AUTODOC_EXTENDABLE_OPTIONS = frozenset({
|
||||
})
|
||||
|
||||
|
||||
class DummyOptionSpec(dict[str, Callable[[str], str]]):
|
||||
class DummyOptionSpec(dict[str, Callable[[str], str]]): # NoQA: FURB189
|
||||
"""An option_spec allows any options."""
|
||||
|
||||
def __bool__(self) -> bool:
|
||||
|
||||
@@ -30,7 +30,7 @@ class _MockObject:
|
||||
__sphinx_mock__ = True
|
||||
__sphinx_decorator_args__: tuple[Any, ...] = ()
|
||||
|
||||
def __new__(cls, *args: Any, **kwargs: Any) -> Any:
|
||||
def __new__(cls, *args: Any, **kwargs: Any) -> Any: # NoQA: ARG004
|
||||
if len(args) == 3 and isinstance(args[1], tuple):
|
||||
superclass = args[1][-1].__class__
|
||||
if superclass is cls:
|
||||
|
||||
@@ -11,7 +11,7 @@ if TYPE_CHECKING:
|
||||
from collections.abc import Set
|
||||
|
||||
|
||||
class FilenameUniqDict(dict[str, tuple[set[str], str]]):
|
||||
class FilenameUniqDict(dict[str, tuple[set[str], str]]): # NoQA: FURB189
|
||||
"""A dictionary that automatically generates unique names for its keys,
|
||||
interpreted as filenames, and keeps track of a set of docnames they
|
||||
appear in. Used for images and downloadable files in the environment.
|
||||
@@ -61,7 +61,7 @@ class FilenameUniqDict(dict[str, tuple[set[str], str]]):
|
||||
self._existing = state
|
||||
|
||||
|
||||
class DownloadFiles(dict[Path, tuple[set[str], _StrPath]]):
|
||||
class DownloadFiles(dict[Path, tuple[set[str], _StrPath]]): # NoQA: FURB189
|
||||
"""A special dictionary for download files.
|
||||
|
||||
.. important:: This class would be refactored in nearly future.
|
||||
|
||||
@@ -221,7 +221,7 @@ def test_format_signature(app):
|
||||
pass
|
||||
|
||||
class FNew:
|
||||
def __new__(cls, a, b=None):
|
||||
def __new__(cls, a, b=None): # NoQA: ARG004
|
||||
return super().__new__(cls)
|
||||
|
||||
class FMeta(metaclass=SomeMeta):
|
||||
|
||||
@@ -45,7 +45,7 @@ if TYPE_CHECKING:
|
||||
from sphinx.util.typing import Inventory
|
||||
|
||||
|
||||
class FakeList(list[str]):
|
||||
class FakeList(list[str]): # NoQA: FURB189
|
||||
def __iter__(self) -> NoReturn:
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
Reference in new issue
Block a user