Skip to content

Commit 012c68a

Browse files
committed
Configure ruff pylint
1 parent d04f908 commit 012c68a

File tree

2 files changed

+127
-1
lines changed

2 files changed

+127
-1
lines changed

.pre-commit-config.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ repos:
3636
files: ^pandas/core/
3737
exclude: ^pandas/core/api\.py$
3838
args: [--select, "ICN001", --exit-non-zero-on-fix]
39+
- id: ruff
40+
args: [--exit-non-zero-on-fix, --preview, "--ignore=E,F841,RUF"]
3941
- id: ruff-format
4042
exclude: ^scripts
4143
- repo: https://github.com/jendrikseipp/vulture

pyproject.toml

+125-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,131 @@ ignore = [
315315
# pairwise-over-zipped (>=PY310 only)
316316
"RUF007",
317317
# mutable-class-default
318-
"RUF012"
318+
"RUF012",
319+
320+
# Additional pylint rules
321+
# literal-membership
322+
"PLR6201", # 847 errors
323+
# Method could be a function, class method, or static method
324+
"PLR6301", # 11411 errors
325+
# Private name import
326+
"PLC2701", # 27 errors
327+
# Too many positional arguments (6/5)
328+
"PLR0917", # 470 errors
329+
# compare-to-empty-string
330+
"PLC1901",
331+
# `tempfile.NamedTemporaryFile` in text mode without explicit `encoding` argument
332+
"PLW1514", # 1 error
333+
# Object does not implement `__hash__` method
334+
"PLW1641", # 16 errors
335+
# Bad or misspelled dunder method name
336+
"PLW3201", # 69 errors, seems to be all false positive
337+
# Unnecessary lookup of dictionary value by key
338+
"PLR1733", # 5 errors, it seems like we wannt to ignore these
339+
# Unnecessary lookup of list item by index
340+
"PLR1736", # 4 errors, we're currently having inline pylint ignore
341+
# empty-comment
342+
"PLR2044", # autofixable
343+
# Unpacking a dictionary in iteration without calling `.items()`
344+
"PLE1141", # autofixable
345+
346+
# Output of pylint-to-ruff
347+
# "PLC0103", # invalid-name
348+
# "PLC0114", # missing-module-docstring
349+
# "PLC0115", # missing-class-docstring
350+
# "PLC0116", # missing-function-docstring
351+
# "PLC0121", # singleton-comparison
352+
# "PLC0123", # unidiomatic-typecheck
353+
# "PLC0200", # consider-using-enumerate
354+
# "PLC0204", # bad-mcs-classmethod-argument
355+
# "PLC0302", # too-many-lines
356+
# "PLC0325", # superfluous-parens
357+
# "PLC0411", # wrong-import-order
358+
# "PLC0412", # ungrouped-imports
359+
# "PLC0413", # wrong-import-position
360+
"PLC0415", # import-outside-toplevel
361+
# "PLC1802", # use-implicit-booleaness-not-len
362+
# "PLC1803", # use-implicit-booleaness-not-comparison
363+
# "PLC1804", # use-implicit-booleaness-not-comparison-to-string
364+
# "PLC1805", # use-implicit-booleaness-not-comparison-to-zero
365+
"PLC2801", # unnecessary-dunder-call
366+
# "PLC3001", # unnecessary-lambda-assignment
367+
# "PLE0110", # abstract-class-instantiated
368+
# "PLE0401", # import-error
369+
# "PLE0601", # used-before-assignment
370+
# "PLE0602", # undefined-variable
371+
# "PLE0611", # no-name-in-module
372+
# "PLE0633", # unpacking-non-sequence
373+
# "PLE1101", # no-member
374+
# "PLE1120", # no-value-for-parameter
375+
# "PLE1121", # too-many-function-args
376+
# "PLE1123", # unexpected-keyword-arg
377+
# "PLE1124", # redundant-keyword-arg
378+
# "PLE1130", # invalid-unary-operand-type
379+
# "PLE1133", # not-an-iterable
380+
# "PLE1135", # unsupported-membership-test
381+
# "PLE1136", # unsubscriptable-object
382+
# "PLE1137", # unsupported-assignment-operation
383+
# "PLI0001", # raw-checker-failed
384+
# "PLI0010", # bad-inline-option
385+
# "PLI0011", # locally-disabled
386+
# "PLI0013", # file-ignored
387+
# "PLI0020", # suppressed-message
388+
# "PLI0021", # useless-suppression
389+
# "PLI0022", # deprecated-pragma
390+
# "PLI0023", # use-symbolic-message-instead
391+
# "PLI1101", # c-extension-no-member
392+
"PLR0124", # comparison-with-itself
393+
# "PLR0401", # cyclic-import
394+
# "PLR0801", # duplicate-code
395+
# "PLR0901", # too-many-ancestors
396+
# "PLR0902", # too-many-instance-attributes
397+
# "PLR0903", # too-few-public-methods
398+
"PLR0904", # too-many-public-methods
399+
"PLR0911", # too-many-return-statements
400+
"PLR0912", # too-many-branches
401+
"PLR0913", # too-many-arguments
402+
"PLR0914", # too-many-locals
403+
"PLR0915", # too-many-statements
404+
"PLR0916", # too-many-boolean-expressions
405+
"PLR1702", # too-many-nested-blocks
406+
"PLR1704", # redefined-argument-from-local
407+
# "PLR1705", # no-else-return
408+
# "PLR1710", # inconsistent-return-statements
409+
# "PLR1720", # no-else-raise
410+
# "PLR1724", # no-else-continue
411+
# "PLR1732", # consider-using-with
412+
# "PLR1735", # use-dict-literal
413+
# "PLW0102", # dangerous-default-value
414+
# "PLW0104", # pointless-statement
415+
# "PLW0106", # expression-not-assigned
416+
"PLW0108", # unnecessary-lambda
417+
# "PLW0123", # eval-used
418+
# "PLW0125", # using-constant-test
419+
# "PLW0143", # comparison-with-callable
420+
# "PLW0201", # attribute-defined-outside-init
421+
# "PLW0212", # protected-access
422+
# "PLW0221", # arguments-differ
423+
# "PLW0222", # signature-differs
424+
# "PLW0223", # abstract-method
425+
# "PLW0231", # super-init-not-called
426+
# "PLW0236", # invalid-overridden-method
427+
# "PLW0237", # arguments-renamed
428+
# "PLW0239", # overridden-final-method
429+
# "PLW0511", # fixme
430+
"PLW0603", # global-statement
431+
# "PLW0613", # unused-argument
432+
# "PLW0621", # redefined-outer-name
433+
# "PLW0622", # redefined-builtin
434+
# "PLW0641", # possibly-unused-variable
435+
# "PLW0642", # self-cls-assignment
436+
# "PLW0706", # try-except-raise
437+
# "PLW0707", # raise-missing-from
438+
# "PLW0718", # broad-exception-caught
439+
# "PLW0719", # broad-exception-raised
440+
# "PLW1113", # keyword-arg-before-vararg
441+
# "PLW1114", # arguments-out-of-order
442+
# "PLW4901", # deprecated-module
319443
]
320444

321445
exclude = [

0 commit comments

Comments
 (0)