File tree 2 files changed +17
-14
lines changed
2 files changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -1512,15 +1512,15 @@ cpplint: lint-cpp
1512
1512
# Try with '--system' if it fails without; the system may have set '--user'
1513
1513
lint-py-build :
1514
1514
$(info Pip installing ruff on $(shell $(PYTHON ) --version) ...)
1515
- $(PYTHON ) -m pip install --upgrade --target tools/pip/site-packages ruff==0.0.272 || \
1516
- $(PYTHON ) -m pip install --upgrade --system --target tools/pip/site-packages ruff==0.0.272
1515
+ $(PYTHON ) -m pip install --upgrade --target tools/pip/site-packages ruff==0.3.4 || \
1516
+ $(PYTHON ) -m pip install --upgrade --system --target tools/pip/site-packages ruff==0.3.4
1517
1517
1518
1518
.PHONY : lint-py
1519
1519
ifneq ("","$(wildcard tools/pip/site-packages/ruff) ")
1520
1520
# Lint the Python code with ruff.
1521
1521
lint-py :
1522
1522
tools/pip/site-packages/bin/ruff --version
1523
- tools/pip/site-packages/bin/ruff .
1523
+ tools/pip/site-packages/bin/ruff check .
1524
1524
else
1525
1525
lint-py :
1526
1526
$(warning Python linting with ruff is not available)
Original file line number Diff line number Diff line change 1
1
[tool .ruff ]
2
+ exclude = [
3
+ " deps" ,
4
+ " tools/cpplint.py" ,
5
+ " tools/gyp" ,
6
+ " tools/inspector_protocol" ,
7
+ " tools/node_modules" ,
8
+ ]
9
+ line-length = 172
10
+ target-version = " py37"
11
+
12
+ [tool .ruff .lint ]
2
13
select = [
3
14
" C90" , # McCabe cyclomatic complexity
4
15
" E" , # pycodestyle
@@ -17,12 +28,6 @@ select = [
17
28
" W" , # pycodestyle
18
29
" YTT" , # flake8-2020
19
30
]
20
- exclude = [
21
- " deps" ,
22
- " tools/gyp" ,
23
- " tools/inspector_protocol" ,
24
- " tools/node_modules" ,
25
- ]
26
31
ignore = [
27
32
" E401" ,
28
33
" E402" ,
@@ -31,19 +36,17 @@ ignore = [
31
36
" RUF005" ,
32
37
" RUF100" ,
33
38
]
34
- line-length = 172
35
- target-version = " py37"
36
39
37
- [tool .ruff .mccabe ]
40
+ [tool .ruff .lint . mccabe ]
38
41
max-complexity = 100
39
42
40
- [tool .ruff .per-file-ignores ]
43
+ [tool .ruff .lint . per-file-ignores ]
41
44
"tools/checkimports.py" = [" W605" ]
42
45
"tools/gyp/pylib/gyp/xcodeproj_file.py" = [" PLE0101" ]
43
46
"tools/icu/shrink-icu-src.py" = [" W605" ]
44
47
"tools/mkssldef.py" = [" W605" ]
45
48
46
- [tool .ruff .pylint ]
49
+ [tool .ruff .lint . pylint ]
47
50
max-args = 12
48
51
max-branches = 110
49
52
max-returns = 12
You can’t perform that action at this time.
0 commit comments