Skip to content

Commit

Permalink
Pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
tqa236 committed Feb 6, 2024
1 parent 07f4523 commit 009fd1c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ repos:
files: ^pandas
exclude: ^pandas/tests
args: [--select, "ANN001,ANN2", --fix-only, --exit-non-zero-on-fix]
- id: ruff
args: [--exit-non-zero-on-fix, --preview, "--ignore=E721,F841,RUF025,RUF100,RUF001,E226,RUF003,E203"]
- id: ruff-format
- repo: https://github.com/jendrikseipp/vulture
rev: v2.11
Expand Down
43 changes: 42 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ ignore = [
# The following rules may cause conflicts when used with the formatter:
"ISC001",


### TODO: Enable gradually
# Useless statement
"B018",
Expand All @@ -321,6 +320,48 @@ ignore = [
"RUF007",
# mutable-class-default
"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
"RUF022",
# Use a `set` literal when testing for membership
"PLR6201",
# Method could be a function, class method, or static method
"PLR6301",
# Too many positional arguments (6/5)
"PLR0917",
# `import` should be at the top-level of a file
"PLC0415",
# Too many public methods (23 > 20)
"PLR0904",
# Too many local variables
"PLR0914",
# Too many nested blocks (6 > 5)
"PLR1702",
# Too many Boolean expressions
"PLR0916",
# Private name import
"PLC2701",
# Redefining argument with the local name
"PLR1704",
# Unnecessary dunder call
"PLC2801",
# Lambda may be unnecessary; consider inlining inner function
# Autofix might not be correct
"PLW0108",
# Object does not implement `__hash__` method
"PLW1641",
# `tempfile.NamedTemporaryFile` in text mode without explicit `encoding` argument
"PLW1514",
# Bad or misspelled dunder method name
"PLW3201",
# Unnecessary lookup of dictionary value by key
"PLR1733",
# Unnecessary lookup of list item by index
"PLR1736"
]

exclude = [
Expand Down

0 comments on commit 009fd1c

Please sign in to comment.