Skip to content

Commit f7d73a9

Browse files
committed
Using more recent linter, ignoring model creation cyclo complexity
1 parent 3783682 commit f7d73a9

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/python-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: install dependencies
2525
run: |
2626
python -m pip install --upgrade pip
27-
pip install ruff==0.1.6
27+
pip install ruff==0.6.4
2828
2929
- name: lint with ruff
3030
run: ruff check --output-format=github .

ruff.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
target-version="py312"
22

33
# Rule selection.
4-
select = [
4+
lint.select = [
55
"E", # pycodestyle errors
66
"W", # pycodestyle warnings
77
"F", # pyflakes
@@ -15,4 +15,11 @@ select = [
1515
line-length = 120
1616

1717
# Allow generous cyclomatic complexity for examples.
18-
mccabe.max-complexity = 25
18+
lint.mccabe.max-complexity = 25
19+
20+
[lint.per-file-ignores]
21+
# Set a different max complexity for a specific file
22+
"python-ortools-shiftassignment/main.py" = ["C901"]
23+
"python-gurobi-knapsack/main.ipynb" = ["I001"]
24+
"python-highs-knapsack/main.ipynb" = ["I001"]
25+
"python-nextroute/main.ipynb" = ["I001"]

0 commit comments

Comments
 (0)