mirror of https://github.com/zulip/zulip.git
ruff: Enable more errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
3d853caf16
commit
d494181127
|
@ -99,9 +99,26 @@ django_settings_module = "zproject.settings"
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
# See https://github.com/charliermarsh/ruff#rules for error code definitions.
|
# See https://github.com/charliermarsh/ruff#rules for error code definitions.
|
||||||
|
extend-select = [
|
||||||
|
"B", # bugbear
|
||||||
|
"C", # comprehensions
|
||||||
|
"M", # meta
|
||||||
|
"U", # upgrade
|
||||||
|
"W", # style warnings
|
||||||
|
]
|
||||||
ignore = [
|
ignore = [
|
||||||
|
"B006", # Do not use mutable data structures for argument defaults
|
||||||
|
"B007", # Loop control variable not used within the loop body
|
||||||
|
"C408", # Unnecessary `dict` call (rewrite as a literal)
|
||||||
"E402", # Module level import not at top of file
|
"E402", # Module level import not at top of file
|
||||||
"E501", # Line too long
|
"E501", # Line too long
|
||||||
"E731", # Do not assign a lambda expression, use a def
|
"E731", # Do not assign a lambda expression, use a def
|
||||||
|
|
||||||
|
# Requires Python 3.9:
|
||||||
|
"U002", # `abspath(__file__)` is unnecessary in Python 3.9 and later
|
||||||
|
"U006", # Use `list` instead of `List` for type annotations
|
||||||
|
|
||||||
|
# Requires Python 3.10:
|
||||||
|
"U007", # Use `X | Y` for type annotations
|
||||||
]
|
]
|
||||||
line-length = 100
|
line-length = 100
|
||||||
|
|
Loading…
Reference in New Issue