Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7e58846

Browse files
committedFeb 17, 2024
Pylint
1 parent ede7dc5 commit 7e58846

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed
 

‎.pre-commit-config.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ repos:
3030
files: ^pandas
3131
exclude: ^pandas/tests
3232
args: [--select, "ANN001,ANN2", --fix-only, --exit-non-zero-on-fix]
33+
- id: ruff
34+
args: [--exit-non-zero-on-fix, --preview, "--ignore=E721,F841,RUF025,RUF100,RUF001,E226,RUF003,E203"]
3335
- id: ruff-format
3436
exclude: ^scripts
3537
- repo: https://github.com/jendrikseipp/vulture

‎pyproject.toml

+42-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ ignore = [
306306
# The following rules may cause conflicts when used with the formatter:
307307
"ISC001",
308308

309-
310309
### TODO: Enable gradually
311310
# Useless statement
312311
"B018",
@@ -320,6 +319,48 @@ ignore = [
320319
"RUF007",
321320
# mutable-class-default
322321
"RUF012",
322+
# Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
323+
# "E721",
324+
# "F841",
325+
# Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
326+
"RUF021",
327+
# `__all__` is not sorted
328+
"RUF022",
329+
# Use a `set` literal when testing for membership
330+
"PLR6201",
331+
# Method could be a function, class method, or static method
332+
"PLR6301",
333+
# Too many positional arguments (6/5)
334+
"PLR0917",
335+
# `import` should be at the top-level of a file
336+
"PLC0415",
337+
# Too many public methods (23 > 20)
338+
"PLR0904",
339+
# Too many local variables
340+
"PLR0914",
341+
# Too many nested blocks (6 > 5)
342+
"PLR1702",
343+
# Too many Boolean expressions
344+
"PLR0916",
345+
# Private name import
346+
"PLC2701",
347+
# Redefining argument with the local name
348+
"PLR1704",
349+
# Unnecessary dunder call
350+
"PLC2801",
351+
# Lambda may be unnecessary; consider inlining inner function
352+
# Autofix might not be correct
353+
"PLW0108",
354+
# Object does not implement `__hash__` method
355+
"PLW1641",
356+
# `tempfile.NamedTemporaryFile` in text mode without explicit `encoding` argument
357+
"PLW1514",
358+
# Bad or misspelled dunder method name
359+
"PLW3201",
360+
# Unnecessary lookup of dictionary value by key
361+
"PLR1733",
362+
# Unnecessary lookup of list item by index
363+
"PLR1736"
323364
]
324365

325366
exclude = [

0 commit comments

Comments
 (0)
Please sign in to comment.