Skip to content

Commit

Permalink
Translate config with pylint-to-ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
tqa236 committed Feb 6, 2024
1 parent 009fd1c commit 893697e
Showing 1 changed file with 100 additions and 5 deletions.
105 changes: 100 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ environment = {CFLAGS="-g0"}
[tool.ruff]
line-length = 88
target-version = "py310"
fix = true
fix = false

[tool.ruff.lint]
unfixable = []
Expand Down Expand Up @@ -276,7 +276,6 @@ ignore = [
# Use `typing.NamedTuple` instead of `collections.namedtuple`
"PYI024",
# No builtin `eval()` allowed
"PGH001",
# "S307", # flake8-bandit is not enabled yet
# compare-to-empty-string
"PLC1901",
Expand Down Expand Up @@ -322,7 +321,6 @@ ignore = [
"RUF012",
# Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
# "E721",
# "F841",
# Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
"RUF021",
# `__all__` is not sorted
Expand Down Expand Up @@ -361,7 +359,105 @@ ignore = [
# Unnecessary lookup of dictionary value by key
"PLR1733",
# Unnecessary lookup of list item by index
"PLR1736"
"PLR1736",

# Output of pylint-to-ruff
# "PLC0103", # invalid-name
# "PLC0114", # missing-module-docstring
# "PLC0115", # missing-class-docstring
# "PLC0116", # missing-function-docstring
# "PLC0121", # singleton-comparison
# "PLC0123", # unidiomatic-typecheck
# "PLC0200", # consider-using-enumerate
# "PLC0204", # bad-mcs-classmethod-argument
# "PLC0302", # too-many-lines
# "PLC0325", # superfluous-parens
# "PLC0411", # wrong-import-order
# "PLC0412", # ungrouped-imports
# "PLC0413", # wrong-import-position
# "PLC0415", # import-outside-toplevel
# "PLC1802", # use-implicit-booleaness-not-len
# "PLC1803", # use-implicit-booleaness-not-comparison
# "PLC1804", # use-implicit-booleaness-not-comparison-to-string
# "PLC1805", # use-implicit-booleaness-not-comparison-to-zero
"PLC2801", # unnecessary-dunder-call
# "PLC3001", # unnecessary-lambda-assignment
# "PLE0110", # abstract-class-instantiated
# "PLE0401", # import-error
# "PLE0601", # used-before-assignment
# "PLE0602", # undefined-variable
# "PLE0611", # no-name-in-module
# "PLE0633", # unpacking-non-sequence
# "PLE1101", # no-member
# "PLE1120", # no-value-for-parameter
# "PLE1121", # too-many-function-args
# "PLE1123", # unexpected-keyword-arg
# "PLE1124", # redundant-keyword-arg
# "PLE1130", # invalid-unary-operand-type
# "PLE1133", # not-an-iterable
# "PLE1135", # unsupported-membership-test
# "PLE1136", # unsubscriptable-object
# "PLE1137", # unsupported-assignment-operation
# "PLI0001", # raw-checker-failed
# "PLI0010", # bad-inline-option
# "PLI0011", # locally-disabled
# "PLI0013", # file-ignored
# "PLI0020", # suppressed-message
# "PLI0021", # useless-suppression
# "PLI0022", # deprecated-pragma
# "PLI0023", # use-symbolic-message-instead
# "PLI1101", # c-extension-no-member
"PLR0124", # comparison-with-itself
# "PLR0401", # cyclic-import
# "PLR0801", # duplicate-code
# "PLR0901", # too-many-ancestors
# "PLR0902", # too-many-instance-attributes
# "PLR0903", # too-few-public-methods
"PLR0904", # too-many-public-methods
"PLR0911", # too-many-return-statements
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0914", # too-many-locals
"PLR0915", # too-many-statements
"PLR0916", # too-many-boolean-expressions
"PLR1702", # too-many-nested-blocks
"PLR1704", # redefined-argument-from-local
# "PLR1705", # no-else-return
# "PLR1710", # inconsistent-return-statements
# "PLR1720", # no-else-raise
# "PLR1724", # no-else-continue
# "PLR1732", # consider-using-with
# "PLR1735", # use-dict-literal
# "PLW0102", # dangerous-default-value
# "PLW0104", # pointless-statement
# "PLW0106", # expression-not-assigned
"PLW0108", # unnecessary-lambda
# "PLW0123", # eval-used
# "PLW0125", # using-constant-test
# "PLW0143", # comparison-with-callable
# "PLW0201", # attribute-defined-outside-init
# "PLW0212", # protected-access
# "PLW0221", # arguments-differ
# "PLW0222", # signature-differs
# "PLW0223", # abstract-method
# "PLW0231", # super-init-not-called
# "PLW0236", # invalid-overridden-method
# "PLW0237", # arguments-renamed
# "PLW0239", # overridden-final-method
# "PLW0511", # fixme
"PLW0603", # global-statement
# "PLW0613", # unused-argument
# "PLW0621", # redefined-outer-name
# "PLW0622", # redefined-builtin
# "PLW0641", # possibly-unused-variable
# "PLW0642", # self-cls-assignment
# "PLW0706", # try-except-raise
# "PLW0707", # raise-missing-from
# "PLW0718", # broad-exception-caught
# "PLW0719", # broad-exception-raised
# "PLW1113", # keyword-arg-before-vararg
# "PLW1114", # arguments-out-of-order
# "PLW4901", # deprecated-module
]

exclude = [
Expand All @@ -379,7 +475,6 @@ exclude = [
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"urllib.request.urlopen".msg = "Use pandas.io.common.urlopen instead of urllib.request.urlopen"

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
# relative imports allowed for asv_bench
"asv_bench/*" = ["TID", "NPY002"]
Expand Down

0 comments on commit 893697e

Please sign in to comment.