Skip to content

Commit d847d73

Browse files
committed
Bump Ruff to 0.9.7
1 parent 7ba7628 commit d847d73

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ docs = [
9292
"sphinxcontrib-websupport",
9393
]
9494
lint = [
95-
"ruff==0.9.6",
95+
"ruff==0.9.7",
9696
"mypy==1.15.0",
9797
"sphinx-lint>=0.9",
9898
"types-colorama==0.4.15.20240311",

sphinx/ext/autodoc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def process(
291291
# This class is used only in ``sphinx.ext.autodoc.directive``,
292292
# But we define this class here to keep compatibility
293293
# See: https://github.com/sphinx-doc/sphinx/issues/4538
294-
class Options(dict[str, Any]):
294+
class Options(dict[str, Any]): # NoQA: FURB189
295295
"""A dict/attribute hybrid that returns None on nonexisting keys."""
296296

297297
def copy(self) -> Options:

sphinx/ext/autodoc/directive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
})
5353

5454

55-
class DummyOptionSpec(dict[str, Callable[[str], str]]):
55+
class DummyOptionSpec(dict[str, Callable[[str], str]]): # NoQA: FURB189
5656
"""An option_spec allows any options."""
5757

5858
def __bool__(self) -> bool:

sphinx/ext/autodoc/mock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class _MockObject:
3030
__sphinx_mock__ = True
3131
__sphinx_decorator_args__: tuple[Any, ...] = ()
3232

33-
def __new__(cls, *args: Any, **kwargs: Any) -> Any:
33+
def __new__(cls, *args: Any, **kwargs: Any) -> Any: # NoQA: ARG004
3434
if len(args) == 3 and isinstance(args[1], tuple):
3535
superclass = args[1][-1].__class__
3636
if superclass is cls:

sphinx/util/_files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from collections.abc import Set
1212

1313

14-
class FilenameUniqDict(dict[str, tuple[set[str], str]]):
14+
class FilenameUniqDict(dict[str, tuple[set[str], str]]): # NoQA: FURB189
1515
"""A dictionary that automatically generates unique names for its keys,
1616
interpreted as filenames, and keeps track of a set of docnames they
1717
appear in. Used for images and downloadable files in the environment.
@@ -61,7 +61,7 @@ def __setstate__(self, state: set[str]) -> None:
6161
self._existing = state
6262

6363

64-
class DownloadFiles(dict[Path, tuple[set[str], _StrPath]]):
64+
class DownloadFiles(dict[Path, tuple[set[str], _StrPath]]): # NoQA: FURB189
6565
"""A special dictionary for download files.
6666
6767
.. important:: This class would be refactored in nearly future.

tests/test_extensions/test_ext_autodoc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def __init__(self, a, b=None):
221221
pass
222222

223223
class FNew:
224-
def __new__(cls, a, b=None):
224+
def __new__(cls, a, b=None): # NoQA: ARG004
225225
return super().__new__(cls)
226226

227227
class FMeta(metaclass=SomeMeta):

tests/test_extensions/test_ext_intersphinx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
from sphinx.util.typing import Inventory
4646

4747

48-
class FakeList(list[str]):
48+
class FakeList(list[str]): # NoQA: FURB189
4949
def __iter__(self) -> NoReturn:
5050
raise NotImplementedError
5151

0 commit comments

Comments
 (0)