Bump Ruff to 0.9.7

This commit is contained in:
Adam Turner committed 2025-02-21 22:21:30 +00:00
1 parent 7ba762870f
commit d847d736ec
7 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -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",
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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:
+2 -2
View File
@@ -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.
+1 -1
View File
@@ -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