@@ -59,6 +59,66 @@ repos:
5959 files : ^.github/workflows/integration-tests.yml.*
6060 pass_filenames : false
6161
62+ - repo : https://github.com/pycqa/pylint
63+ rev : v3.3.6
64+ hooks :
65+ - id : pylint
66+ name : pylint for scripts
67+ files : ' ^scripts/.*\.py$'
68+ args :
69+ - --check-quote-consistency=true
70+ # Max line length 120 is consistent with ruff's one in upstream
71+ - --max-line-length=120
72+ # Disable line-too-long: rely on ruff's check for line length
73+ - --disable=line-too-long
74+ # Disable import-error: not everything can be imported when pre-commit runs
75+ - --disable=import-error
76+ # Disable unused-import: ruff has a corresponding check and supports "noqa: F401"
77+ - --disable=unused-import
78+ # FIXME: revisit these checks later
79+ - --disable=missing-module-docstring
80+ - --disable=missing-function-docstring
81+ - --disable=missing-class-docstring
82+ - --disable=duplicate-code
83+ - --disable=too-many-locals
84+ - --disable=too-many-statements
85+ - --disable=too-many-arguments
86+ - --disable=too-many-positional-arguments
87+ stages : [pre-commit, pre-push, manual]
88+
89+ - id : pylint
90+ name : pylint for benchmarks
91+ files : ' ^benchmarks/.*\.py$'
92+ args :
93+ - --check-quote-consistency=true
94+ # Max line length 120 is consistent with ruff's one in upstream
95+ - --max-line-length=120
96+ # Disable line-too-long: rely on ruff's check for line length
97+ - --disable=line-too-long
98+ # Disable import-error: not everything can be imported when pre-commit runs
99+ - --disable=import-error
100+ - --disable=no-name-in-module
101+ # Disable unused-import: ruff has a corresponding check and supports "noqa: F401"
102+ - --disable=unused-import
103+ # Disable invalid_name: benchmarks use a lot of UPPER_SNAKE arguments
104+ - --disable=invalid-name
105+ # Disable unnecessary-lambda-assignment: benchmark use a lot of lambda assignments
106+ - --disable=unnecessary-lambda-assignment
107+ # FIXME: revisit these checks later
108+ - --disable=import-outside-toplevel
109+ - --disable=too-few-public-methods
110+ - --disable=consider-using-generator
111+ - --disable=missing-module-docstring
112+ - --disable=missing-function-docstring
113+ - --disable=missing-class-docstring
114+ - --disable=duplicate-code
115+ - --disable=too-many-locals
116+ - --disable=too-many-statements
117+ - --disable=too-many-arguments
118+ - --disable=too-many-positional-arguments
119+ - --disable=fixme
120+ stages : [pre-commit, pre-push, manual]
121+
62122 - repo : https://github.com/pre-commit/mirrors-mypy
63123 rev : v1.13.0
64124 hooks :
0 commit comments