File tree 4 files changed +14
-11
lines changed
4 files changed +14
-11
lines changed Original file line number Diff line number Diff line change 22
22
- id : black
23
23
24
24
- repo : https://github.com/astral-sh/ruff-pre-commit
25
- rev : v0.1.9
25
+ rev : v0.2.0
26
26
hooks :
27
27
- id : ruff
28
28
args : [--fix, --exit-non-zero-on-fix]
Original file line number Diff line number Diff line change
1
+ Update ruff to 0.2.0 and update ruff config to reflect
Original file line number Diff line number Diff line change 13
13
14
14
# fmt: off
15
15
sys .path .append ("." )
16
- from tools import release # isort:skip # noqa
16
+ from tools import release # isort:skip
17
17
sys .path .pop ()
18
18
# fmt: on
19
19
Original file line number Diff line number Diff line change @@ -138,20 +138,23 @@ distlib = "https://bitbucket.org/pypa/distlib/raw/master/LICENSE.txt"
138
138
webencodings = " https://github.com/SimonSapin/python-webencodings/raw/master/LICENSE"
139
139
140
140
[tool .ruff ]
141
+ src = [" src" ]
142
+ target-version = " py37"
143
+ line-length = 88
141
144
extend-exclude = [
142
145
" _vendor" ,
143
146
" ./build" ,
144
147
" .scratch" ,
145
148
" data" ,
146
149
]
150
+
151
+ [tool .ruff .lint ]
147
152
ignore = [
148
153
" B019" ,
149
154
" B020" ,
150
155
" B904" , # Ruff enables opinionated warnings by default
151
156
" B905" , # Ruff enables opinionated warnings by default
152
157
]
153
- target-version = " py37"
154
- line-length = 88
155
158
select = [
156
159
" ASYNC" ,
157
160
" B" ,
@@ -170,22 +173,21 @@ select = [
170
173
" UP032" ,
171
174
]
172
175
173
- [tool .ruff .isort ]
174
- # We need to explicitly make pip "first party" as it's imported by code in
175
- # the docs and tests directories.
176
- known-first-party = [" pip" ]
176
+ [tool .ruff .lint .isort ]
177
+ # Explicitly make tests "first party" as it's not in the "src" directory
178
+ known-first-party = [" tests" ]
177
179
known-third-party = [" pip._vendor" ]
178
180
179
- [tool .ruff .mccabe ]
181
+ [tool .ruff .lint . mccabe ]
180
182
max-complexity = 33 # default is 10
181
183
182
- [tool .ruff .per-file-ignores ]
184
+ [tool .ruff .lint . per-file-ignores ]
183
185
"noxfile.py" = [" G" ]
184
186
"src/pip/_internal/*" = [" PERF203" ]
185
187
"tests/*" = [" B011" ]
186
188
"tests/unit/test_finder.py" = [" C414" ]
187
189
188
- [tool .ruff .pylint ]
190
+ [tool .ruff .lint . pylint ]
189
191
max-args = 15 # default is 5
190
192
max-branches = 28 # default is 12
191
193
max-returns = 13 # default is 6
You can’t perform that action at this time.
0 commit comments