Skip to content

Commit

Permalink
Enable the RUF036 lint in Ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Dec 1, 2024
1 parent a843532 commit 9f0194d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ select = [
"RUF033", # `__post_init__` method with argument defaults
"RUF034", # Useless `if`-`else` condition
"RUF035", # Unsafe use of `{name}` detected
# "RUF036", # `None` not at the end of the type annotation.
"RUF036", # `None` not at the end of the type annotation.
"RUF038", # `Literal[True, False, ...]` can be replaced with `Literal[...] | bool`
# "RUF039", # First argument to {call} is not raw string
"RUF040", # Non-string literal used as assert message
Expand Down Expand Up @@ -367,7 +367,7 @@ select = [
]

# these tests need old ``typing`` generic aliases
"tests/test_util/test_util_typing.py" = ["UP006", "UP007", "UP035"]
"tests/test_util/test_util_typing.py" = ["RUF036", "UP006", "UP007", "UP035"]
"tests/test_util/typing_test_data.py" = ["FA100", "I002", "PYI030", "UP006", "UP007", "UP035"]

"utils/*" = [
Expand Down
6 changes: 3 additions & 3 deletions sphinx/util/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ def warning( # type: ignore[override]
self,
msg: object,
*args: object,
type: None | str = None,
subtype: None | str = None,
location: None | str | tuple[str | None, int | None] | Node = None,
type: str | None = None,
subtype: str | None = None,
location: str | tuple[str | None, int | None] | Node | None = None,
nonl: bool = True,
color: str | None = None,
once: bool = False,
Expand Down

0 comments on commit 9f0194d

Please sign in to comment.