mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Enable the RUF036 lint in Ruff
This commit is contained in:
@@ -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
|
||||
@@ -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/*" = [
|
||||
|
||||
@@ -161,9 +161,9 @@ class SphinxLoggerAdapter(logging.LoggerAdapter):
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user