Skip to content

Commit 18c4208

Browse files
committed
Pylint
1 parent f664d6a commit 18c4208

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
- repo: https://github.com/jendrikseipp/vulture
3537
rev: v2.11

pyproject.toml

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

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

326367
exclude = [

0 commit comments

Comments
 (0)