mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-13 03:21:07 +08:00
Enable Ruff PLR (Pylint Refactor) (#13307)
This commit is contained in:
@@ -46,6 +46,7 @@ select = [
|
||||
"N", # pep8-naming
|
||||
"PGH", # pygrep-hooks
|
||||
"PLC", # Pylint Convention
|
||||
"PLR", # Pylint Refactor
|
||||
"RUF", # Ruff-specific and unused-noqa
|
||||
"TRY", # tryceratops
|
||||
"UP", # pyupgrade
|
||||
@@ -142,6 +143,12 @@ ignore = [
|
||||
# Used for direct, non-subclass type comparison, for example: `type(val) is str`
|
||||
# see https://github.com/astral-sh/ruff/issues/6465
|
||||
"E721", # Do not compare types, use `isinstance()`
|
||||
# Leave the size and complexity of tests to human interpretation
|
||||
"PLR09", # Too many ...
|
||||
# Too many magic number "2" that are preferable inline. https://github.com/astral-sh/ruff/issues/10009
|
||||
"PLR2004", # Magic value used in comparison, consider replacing `{value}` with a constant variable
|
||||
# Keep codeflow path separation explicit
|
||||
"PLR5501", # Use `elif` instead of `else` then `if`, to reduce indentation
|
||||
# Mostly from scripts and tests, it's ok to have messages passed directly to exceptions
|
||||
"TRY003", # Avoid specifying long messages outside the exception class
|
||||
# Slower and more verbose https://github.com/astral-sh/ruff/issues/7871
|
||||
|
||||
Reference in New Issue
Block a user