mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Enable the entire RET category in Ruff
This commit is contained in:
parent
c66d3e85d1
commit
dbf62cd503
13
.ruff.toml
13
.ruff.toml
@ -90,6 +90,10 @@ ignore = [
|
|||||||
"PTH123", # `open()` should be replaced by `Path.open()`
|
"PTH123", # `open()` should be replaced by `Path.open()`
|
||||||
# flake8-pyi ('PYI')
|
# flake8-pyi ('PYI')
|
||||||
"PYI025", # Use `from collections.abc import Set as AbstractSet` to avoid confusion with the `set` builtin
|
"PYI025", # Use `from collections.abc import Set as AbstractSet` to avoid confusion with the `set` builtin
|
||||||
|
# flake8-return
|
||||||
|
"RET504", # Unnecessary assignment to `{name}` before `return` statement
|
||||||
|
"RET505", # Unnecessary `{branch}` after `return` statement
|
||||||
|
"RET506", # Unnecessary `{branch}` after `raise` statement
|
||||||
# flake8-bandit ('S')
|
# flake8-bandit ('S')
|
||||||
"S101", # Use of `assert` detected
|
"S101", # Use of `assert` detected
|
||||||
"S110", # `try`-`except`-`pass` detected, consider logging the exception
|
"S110", # `try`-`except`-`pass` detected, consider logging the exception
|
||||||
@ -256,14 +260,7 @@ select = [
|
|||||||
# flake8-quotes ('Q')
|
# flake8-quotes ('Q')
|
||||||
"Q",
|
"Q",
|
||||||
# flake8-return ('RET')
|
# flake8-return ('RET')
|
||||||
"RET501", # Do not explicitly `return None` in function if it is the only possible return value
|
"RET",
|
||||||
"RET502", # Do not implicitly `return None` in function able to return non-`None` value
|
|
||||||
"RET503", # Missing explicit `return` at the end of function able to return non-`None` value
|
|
||||||
# "RET504", # Unnecessary assignment to `{name}` before `return` statement
|
|
||||||
# "RET505", # Unnecessary `{branch}` after `return` statement
|
|
||||||
# "RET506", # Unnecessary `{branch}` after `raise` statement
|
|
||||||
"RET507", # Unnecessary `{branch}` after `continue` statement
|
|
||||||
"RET508", # Unnecessary `{branch}` after `break` statement
|
|
||||||
# flake8-raise ('RSE')
|
# flake8-raise ('RSE')
|
||||||
"RSE",
|
"RSE",
|
||||||
# Ruff-specific rules ('RUF')
|
# Ruff-specific rules ('RUF')
|
||||||
|
Loading…
Reference in New Issue
Block a user