Skip to content

Commit

Permalink
Bump Ruff to 0.9.7
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Feb 21, 2025
1 parent 7ba7628 commit d847d73
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion sphinx/ext/autodoc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def process(
# 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:
Expand Down
2 changes: 1 addition & 1 deletion sphinx/ext/autodoc/directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
})


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:
Expand Down
2 changes: 1 addition & 1 deletion sphinx/ext/autodoc/mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions sphinx/util/_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
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.
Expand Down Expand Up @@ -61,7 +61,7 @@ def __setstate__(self, state: set[str]) -> None:
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.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_extensions/test_ext_autodoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def __init__(self, a, b=None):
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):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_extensions/test_ext_intersphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from sphinx.util.typing import Inventory


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

Expand Down

0 comments on commit d847d73

Please sign in to comment.