File tree Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -1512,15 +1512,15 @@ cpplint: lint-cpp
15121512# Try with '--system' if it fails without; the system may have set '--user'
15131513lint-py-build :
15141514 $(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
15171517
15181518.PHONY : lint-py
15191519ifneq ("","$(wildcard tools/pip/site-packages/ruff) ")
15201520# Lint the Python code with ruff.
15211521lint-py :
15221522 tools/pip/site-packages/bin/ruff --version
1523- tools/pip/site-packages/bin/ruff .
1523+ tools/pip/site-packages/bin/ruff check .
15241524else
15251525lint-py :
15261526 $(warning Python linting with ruff is not available)
Original file line number Diff line number Diff line change 11[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 ]
213select = [
314 " C90" , # McCabe cyclomatic complexity
415 " E" , # pycodestyle
@@ -17,12 +28,6 @@ select = [
1728 " W" , # pycodestyle
1829 " YTT" , # flake8-2020
1930]
20- exclude = [
21- " deps" ,
22- " tools/gyp" ,
23- " tools/inspector_protocol" ,
24- " tools/node_modules" ,
25- ]
2631ignore = [
2732 " E401" ,
2833 " E402" ,
@@ -31,19 +36,17 @@ ignore = [
3136 " RUF005" ,
3237 " RUF100" ,
3338]
34- line-length = 172
35- target-version = " py37"
3639
37- [tool .ruff .mccabe ]
40+ [tool .ruff .lint . mccabe ]
3841max-complexity = 100
3942
40- [tool .ruff .per-file-ignores ]
43+ [tool .ruff .lint . per-file-ignores ]
4144"tools/checkimports.py" = [" W605" ]
4245"tools/gyp/pylib/gyp/xcodeproj_file.py" = [" PLE0101" ]
4346"tools/icu/shrink-icu-src.py" = [" W605" ]
4447"tools/mkssldef.py" = [" W605" ]
4548
46- [tool .ruff .pylint ]
49+ [tool .ruff .lint . pylint ]
4750max-args = 12
4851max-branches = 110
4952max-returns = 12
You can’t perform that action at this time.
0 commit comments