Commit db9976a
This pull request removes support for `flake8` in favor of using `ruff`
as the primary Python linter and code style checker. It updates
configuration files, scripts, and workflow definitions to reflect this
change, and consolidates all linting rules and ignores into
`pyproject.toml` under the `[tool.ruff]` section.
**Migration from flake8 to ruff:**
* Removed all references to `flake8` and its plugins from
`requirements-dev.txt`, `setup.cfg`, and the `runtests.sh` script,
making `ruff` the sole linter for code style checks.
[[1]](diffhunk://#diff-2b4945591edfeaa4cf4d3f155e66d4b43d1bda7a55d881d5cf3107f1b05abbbcL13-L15)
[[2]](diffhunk://#diff-fa602a8a75dc9dcc92261bac5f533c2a85e34fcceaff63b3a3a81d9acde2fc52L182-L211)
[[3]](diffhunk://#diff-8b8238839d9c98a26d9a1d5a504a38807afa0dbee153e4d565de8e617e98e51fL46)
[[4]](diffhunk://#diff-8b8238839d9c98a26d9a1d5a504a38807afa0dbee153e4d565de8e617e98e51fL63-R62)
[[5]](diffhunk://#diff-8b8238839d9c98a26d9a1d5a504a38807afa0dbee153e4d565de8e617e98e51fL83)
[[6]](diffhunk://#diff-8b8238839d9c98a26d9a1d5a504a38807afa0dbee153e4d565de8e617e98e51fL270)
[[7]](diffhunk://#diff-8b8238839d9c98a26d9a1d5a504a38807afa0dbee153e4d565de8e617e98e51fL302-L304)
[[8]](diffhunk://#diff-8b8238839d9c98a26d9a1d5a504a38807afa0dbee153e4d565de8e617e98e51fL536-L561)
* Updated GitHub Actions workflow job names from `flake8-py3` to
`lint-py3` to reflect the switch to `ruff`.
[[1]](diffhunk://#diff-cbf97851bdfebccf2fcdd8848c6a93adb8d8affd5c6b1faf00238d528c3ef6cbL25-R25)
[[2]](diffhunk://#diff-9b4c9bf29b5daef8f9801986e98f75a0dfd296014e719d3fcfb1ac359c063c74L8-R8)
**Ruff configuration enhancements:**
* Expanded the `[tool.ruff.lint].select` list in `pyproject.toml` to
include additional rule sets previously covered by `flake8` plugins
(e.g., `B` for flake8-bugbear, `C90` for mccabe, `N` for pep8-naming,
etc.).
* Migrated and extended ignore rules from `flake8` to `ruff`, ensuring
that all previously ignored warnings and errors are now managed through
`pyproject.toml`.
* Adjusted `line-length` in `pyproject.toml` from 133 to 120 to
standardize formatting.
**Cleanup:**
* Removed the `[flake8]` section from `setup.cfg`, consolidating all
linting configuration into `pyproject.toml`.
---------
Signed-off-by: jirka <jirka.borovec@seznam.cz>
Signed-off-by: jirka <6035284+Borda@users.noreply.github.com>
Signed-off-by: Soumya Snigdha Kundu <soumya_snigdha.kundu@kcl.ac.uk>
Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
Signed-off-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Soumya Snigdha Kundu <soumyawork15@gmail.com>
Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
Co-authored-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
1 parent d0b237b commit db9976a
File tree
23 files changed
+51
-118
lines changed- monai
- apps
- auto3dseg
- deepedit
- detection/transforms
- auto3dseg
- data
- fl/client
- metrics
- networks
- blocks
- nets
- transforms
- regularization
- utils
- tests
- handlers
- integration
- utils/type_conversion
23 files changed
+51
-118
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
| 211 | + | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | | - | |
169 | 167 | | |
170 | 168 | | |
171 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | | - | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
36 | | - | |
37 | 34 | | |
38 | 35 | | |
39 | 36 | | |
40 | | - | |
41 | 37 | | |
42 | 38 | | |
43 | 39 | | |
44 | | - | |
45 | 40 | | |
46 | 41 | | |
47 | 42 | | |
| |||
70 | 65 | | |
71 | 66 | | |
72 | 67 | | |
73 | | - | |
74 | 68 | | |
75 | 69 | | |
76 | 70 | | |
77 | | - | |
78 | 71 | | |
79 | 72 | | |
80 | 73 | | |
81 | | - | |
82 | 74 | | |
83 | 75 | | |
84 | 76 | | |
85 | | - | |
86 | 77 | | |
87 | 78 | | |
88 | 79 | | |
89 | | - | |
90 | 80 | | |
91 | 81 | | |
92 | 82 | | |
93 | | - | |
94 | 83 | | |
95 | 84 | | |
96 | 85 | | |
97 | | - | |
98 | 86 | | |
99 | 87 | | |
100 | 88 | | |
| |||
104 | 92 | | |
105 | 93 | | |
106 | 94 | | |
107 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
594 | | - | |
| 594 | + | |
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
| |||
731 | 731 | | |
732 | 732 | | |
733 | 733 | | |
734 | | - | |
| 734 | + | |
735 | 735 | | |
736 | 736 | | |
737 | 737 | | |
| |||
1041 | 1041 | | |
1042 | 1042 | | |
1043 | 1043 | | |
1044 | | - | |
| 1044 | + | |
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
| |||
1134 | 1134 | | |
1135 | 1135 | | |
1136 | 1136 | | |
1137 | | - | |
| 1137 | + | |
1138 | 1138 | | |
1139 | 1139 | | |
1140 | 1140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
47 | 45 | | |
48 | 46 | | |
49 | 47 | | |
| |||
53 | 51 | | |
54 | 52 | | |
55 | 53 | | |
56 | | - | |
57 | | - | |
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | | - | |
631 | 630 | | |
632 | 631 | | |
633 | 632 | | |
| |||
0 commit comments