1
1
[tool .ruff ]
2
- lint.ignore = [ # `ruff rule S101` for a description of that rule
3
- " B904" , # Within an `except` clause, raise exceptions with `raise ... from err` -- FIX ME
4
- " B905" , # `zip()` without an explicit `strict=` parameter -- FIX ME
5
- " EM101" , # Exception must not use a string literal, assign to variable first
6
- " EXE001" , # Shebang is present but file is not executable -- DO NOT FIX
7
- " G004" , # Logging statement uses f-string
8
- " PLC1901" , # `{}` can be simplified to `{}` as an empty string is falsey
9
- " PLW060" , # Using global for `{name}` but no assignment is done -- DO NOT FIX
10
- " PLW2901" , # PLW2901: Redefined loop variable -- FIX ME
11
- " PT011" , # `pytest.raises(Exception)` is too broad, set the `match` parameter or use a more specific exception
12
- " PT018" , # Assertion should be broken down into multiple parts
13
- " S101" , # Use of `assert` detected -- DO NOT FIX
14
- " S311" , # Standard pseudo-random generators are not suitable for cryptographic purposes -- FIX ME
15
- " SLF001" , # Private member accessed: `_Iterator` -- FIX ME
16
- " UP038" , # Use `X | Y` in `{}` call instead of `(X, Y)` -- DO NOT FIX
17
- ]
18
- lint.select = [ # https://beta.ruff.rs/docs/rules
19
- " A" , # flake8-builtins
20
- " ARG" , # flake8-unused-arguments
21
- " ASYNC" , # flake8-async
22
- " B" , # flake8-bugbear
23
- " BLE" , # flake8-blind-except
24
- " C4" , # flake8-comprehensions
25
- " C90" , # McCabe cyclomatic complexity
26
- " DJ" , # flake8-django
27
- " DTZ" , # flake8-datetimez
28
- " E" , # pycodestyle
29
- " EM" , # flake8-errmsg
30
- " EXE" , # flake8-executable
31
- " F" , # Pyflakes
32
- " FA" , # flake8-future-annotations
33
- " FLY" , # flynt
34
- " G" , # flake8-logging-format
35
- " I" , # isort
36
- " ICN" , # flake8-import-conventions
37
- " INP" , # flake8-no-pep420
38
- " INT" , # flake8-gettext
39
- " ISC" , # flake8-implicit-str-concat
40
- " N" , # pep8-naming
41
- " NPY" , # NumPy-specific rules
42
- " PD" , # pandas-vet
43
- " PGH" , # pygrep-hooks
44
- " PIE" , # flake8-pie
45
- " PL" , # Pylint
46
- " PT" , # flake8-pytest-style
47
- " PYI" , # flake8-pyi
48
- " RSE" , # flake8-raise
49
- " RUF" , # Ruff-specific rules
50
- " S" , # flake8-bandit
51
- " SIM" , # flake8-simplify
52
- " SLF" , # flake8-self
53
- " T10" , # flake8-debugger
54
- " TD" , # flake8-todos
55
- " TID" , # flake8-tidy-imports
56
- " UP" , # pyupgrade
57
- " W" , # pycodestyle
58
- " YTT" , # flake8-2020
2
+ lint.ignore = [ # `ruff rule S101` for a description of that rule
3
+ " B904" , # Within an `except` clause, raise exceptions with `raise ... from err` -- FIX ME
4
+ " B905" , # `zip()` without an explicit `strict=` parameter -- FIX ME
5
+ " EM101" , # Exception must not use a string literal, assign to variable first
6
+ " EXE001" , # Shebang is present but file is not executable -- DO NOT FIX
7
+ " G004" , # Logging statement uses f-string
8
+ " PLC1901" , # `{}` can be simplified to `{}` as an empty string is falsey
9
+ " PLW060" , # Using global for `{name}` but no assignment is done -- DO NOT FIX
10
+ " PLW2901" , # PLW2901: Redefined loop variable -- FIX ME
11
+ " PT011" , # `pytest.raises(Exception)` is too broad, set the `match` parameter or use a more specific exception
12
+ " PT018" , # Assertion should be broken down into multiple parts
13
+ " S101" , # Use of `assert` detected -- DO NOT FIX
14
+ " S311" , # Standard pseudo-random generators are not suitable for cryptographic purposes -- FIX ME
15
+ " SLF001" , # Private member accessed: `_Iterator` -- FIX ME
16
+ " UP038" , # Use `X | Y` in `{}` call instead of `(X, Y)` -- DO NOT FIX
17
+ ]
18
+ lint.select = [ # https://beta.ruff.rs/docs/rules
19
+ " A" , # flake8-builtins
20
+ " ARG" , # flake8-unused-arguments
21
+ " ASYNC" , # flake8-async
22
+ " B" , # flake8-bugbear
23
+ " BLE" , # flake8-blind-except
24
+ " C4" , # flake8-comprehensions
25
+ " C90" , # McCabe cyclomatic complexity
26
+ " DJ" , # flake8-django
27
+ " DTZ" , # flake8-datetimez
28
+ " E" , # pycodestyle
29
+ " EM" , # flake8-errmsg
30
+ " EXE" , # flake8-executable
31
+ " F" , # Pyflakes
32
+ " FA" , # flake8-future-annotations
33
+ " FLY" , # flynt
34
+ " G" , # flake8-logging-format
35
+ " I" , # isort
36
+ " ICN" , # flake8-import-conventions
37
+ " INP" , # flake8-no-pep420
38
+ " INT" , # flake8-gettext
39
+ " ISC" , # flake8-implicit-str-concat
40
+ " N" , # pep8-naming
41
+ " NPY" , # NumPy-specific rules
42
+ " PD" , # pandas-vet
43
+ " PGH" , # pygrep-hooks
44
+ " PIE" , # flake8-pie
45
+ " PL" , # Pylint
46
+ " PT" , # flake8-pytest-style
47
+ " PYI" , # flake8-pyi
48
+ " RSE" , # flake8-raise
49
+ " RUF" , # Ruff-specific rules
50
+ " S" , # flake8-bandit
51
+ " SIM" , # flake8-simplify
52
+ " SLF" , # flake8-self
53
+ " T10" , # flake8-debugger
54
+ " TD" , # flake8-todos
55
+ " TID" , # flake8-tidy-imports
56
+ " UP" , # pyupgrade
57
+ " W" , # pycodestyle
58
+ " YTT" , # flake8-2020
59
59
# "ANN", # flake8-annotations # FIX ME?
60
60
# "COM", # flake8-commas
61
61
# "D", # pydocstyle -- FIX ME?
@@ -71,45 +71,69 @@ lint.select = [ # https://beta.ruff.rs/docs/rules
71
71
output-format = " full"
72
72
target-version = " py312"
73
73
74
- [tool .ruff .lint .mccabe ] # DO NOT INCREASE THIS VALUE
75
- max-complexity = 17 # default: 10
74
+ [tool .ruff .lint .mccabe ] # DO NOT INCREASE THIS VALUE
75
+ max-complexity = 17 # default: 10
76
76
77
77
[tool .ruff .lint .per-file-ignores ]
78
- "arithmetic_analysis/newton_raphson.py" = [" PGH001" ]
79
- "data_structures/binary_tree/binary_search_tree_recursive.py" = [" BLE001" ]
80
- "data_structures/hashing/tests/test_hash_map.py" = [" BLE001" ]
81
- "hashes/enigma_machine.py" = [" BLE001" ]
82
- "machine_learning/sequential_minimum_optimization.py" = [" SIM115" ]
83
- "matrix/sherman_morrison.py" = [" SIM103" ]
84
- "other/l*u_cache.py" = [" RUF012" ]
85
- "physics/newtons_second_law_of_motion.py" = [" BLE001" ]
86
- "project_euler/problem_099/sol1.py" = [" SIM115" ]
87
- "sorts/external_sort.py" = [" SIM115" ]
78
+ "arithmetic_analysis/newton_raphson.py" = [
79
+ " PGH001" ,
80
+ ]
81
+ "data_structures/binary_tree/binary_search_tree_recursive.py" = [
82
+ " BLE001" ,
83
+ ]
84
+ "data_structures/hashing/tests/test_hash_map.py" = [
85
+ " BLE001" ,
86
+ ]
87
+ "hashes/enigma_machine.py" = [
88
+ " BLE001" ,
89
+ ]
90
+ "machine_learning/sequential_minimum_optimization.py" = [
91
+ " SIM115" ,
92
+ ]
93
+ "matrix/sherman_morrison.py" = [
94
+ " SIM103" ,
95
+ ]
96
+ "other/l*u_cache.py" = [
97
+ " RUF012" ,
98
+ ]
99
+ "physics/newtons_second_law_of_motion.py" = [
100
+ " BLE001" ,
101
+ ]
102
+ "project_euler/problem_099/sol1.py" = [
103
+ " SIM115" ,
104
+ ]
105
+ "sorts/external_sort.py" = [
106
+ " SIM115" ,
107
+ ]
88
108
89
- [tool .ruff .lint .pylint ] # DO NOT INCREASE THESE VALUES
90
- allow-magic-value-types = [" float" , " int" , " str" ]
91
- max-args = 10 # default: 5
92
- max-branches = 20 # default: 12
93
- max-returns = 8 # default: 6
94
- max-statements = 88 # default: 50
109
+ [tool .ruff .lint .pylint ] # DO NOT INCREASE THESE VALUES
110
+ allow-magic-value-types = [
111
+ " float" ,
112
+ " int" ,
113
+ " str" ,
114
+ ]
115
+ max-args = 10 # default: 5
116
+ max-branches = 20 # default: 12
117
+ max-returns = 8 # default: 6
118
+ max-statements = 88 # default: 50
95
119
96
120
[tool .codespell ]
97
121
ignore-words-list = " 3rt,ans,bitap,crate,damon,fo,followings,hist,iff,kwanza,manuel,mater,secant,som,sur,tim,toi,zar"
98
122
skip = " ./.*,*.json,ciphers/prehistoric_men.txt,project_euler/problem_022/p022_names.txt,pyproject.toml,strings/dictionary.txt,strings/words.txt"
99
123
100
124
[tool .pytest .ini_options ]
101
125
markers = [
102
- " mat_ops: mark a test as utilizing matrix operations." ,
126
+ " mat_ops: mark a test as utilizing matrix operations." ,
103
127
]
104
128
addopts = [
105
- " --durations=10" ,
106
- " --doctest-modules" ,
107
- " --showlocals" ,
129
+ " --durations=10" ,
130
+ " --doctest-modules" ,
131
+ " --showlocals" ,
108
132
]
109
133
110
134
[tool .coverage .report ]
111
135
omit = [
112
136
" .env/*" ,
113
- " project_euler/*"
137
+ " project_euler/*" ,
114
138
]
115
139
sort = " Cover"
0 commit comments