|
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 |
| 2 | +target-version = "py312" |
| 3 | + |
| 4 | +output-format = "full" |
| 5 | +lint.select = [ |
| 6 | + # https://beta.ruff.rs/docs/rules |
19 | 7 | "A", # flake8-builtins
|
20 | 8 | "ARG", # flake8-unused-arguments
|
21 | 9 | "ASYNC", # flake8-async
|
@@ -68,54 +56,63 @@ lint.select = [ # https://beta.ruff.rs/docs/rules
|
68 | 56 | # "TCH", # flake8-type-checking
|
69 | 57 | # "TRY", # tryceratops
|
70 | 58 | ]
|
71 |
| -output-format = "full" |
72 |
| -target-version = "py312" |
73 |
| - |
74 |
| -[tool.ruff.lint.mccabe] # DO NOT INCREASE THIS VALUE |
75 |
| -max-complexity = 17 # default: 10 |
76 |
| - |
77 |
| -[tool.ruff.lint.per-file-ignores] |
78 |
| -"arithmetic_analysis/newton_raphson.py" = [ |
| 59 | +lint.per-file-ignores."arithmetic_analysis/newton_raphson.py" = [ |
79 | 60 | "PGH001",
|
80 | 61 | ]
|
81 |
| -"data_structures/binary_tree/binary_search_tree_recursive.py" = [ |
| 62 | +lint.per-file-ignores."data_structures/binary_tree/binary_search_tree_recursive.py" = [ |
82 | 63 | "BLE001",
|
83 | 64 | ]
|
84 |
| -"data_structures/hashing/tests/test_hash_map.py" = [ |
| 65 | +lint.per-file-ignores."data_structures/hashing/tests/test_hash_map.py" = [ |
85 | 66 | "BLE001",
|
86 | 67 | ]
|
87 |
| -"hashes/enigma_machine.py" = [ |
| 68 | +lint.per-file-ignores."hashes/enigma_machine.py" = [ |
88 | 69 | "BLE001",
|
89 | 70 | ]
|
90 |
| -"machine_learning/sequential_minimum_optimization.py" = [ |
| 71 | +lint.per-file-ignores."machine_learning/sequential_minimum_optimization.py" = [ |
91 | 72 | "SIM115",
|
92 | 73 | ]
|
93 |
| -"matrix/sherman_morrison.py" = [ |
| 74 | +lint.per-file-ignores."matrix/sherman_morrison.py" = [ |
94 | 75 | "SIM103",
|
95 | 76 | ]
|
96 |
| -"other/l*u_cache.py" = [ |
| 77 | +lint.per-file-ignores."other/l*u_cache.py" = [ |
97 | 78 | "RUF012",
|
98 | 79 | ]
|
99 |
| -"physics/newtons_second_law_of_motion.py" = [ |
| 80 | +lint.per-file-ignores."physics/newtons_second_law_of_motion.py" = [ |
100 | 81 | "BLE001",
|
101 | 82 | ]
|
102 |
| -"project_euler/problem_099/sol1.py" = [ |
| 83 | +lint.per-file-ignores."project_euler/problem_099/sol1.py" = [ |
103 | 84 | "SIM115",
|
104 | 85 | ]
|
105 |
| -"sorts/external_sort.py" = [ |
| 86 | +lint.per-file-ignores."sorts/external_sort.py" = [ |
106 | 87 | "SIM115",
|
107 | 88 | ]
|
108 |
| - |
109 |
| -[tool.ruff.lint.pylint] # DO NOT INCREASE THESE VALUES |
110 |
| -allow-magic-value-types = [ |
| 89 | +lint.mccabe.max-complexity = 17 # default: 10 |
| 90 | +lint.pylint.allow-magic-value-types = [ |
111 | 91 | "float",
|
112 | 92 | "int",
|
113 | 93 | "str",
|
114 | 94 | ]
|
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 | +lint.pylint.max-args = 10 # default: 5 |
| 96 | +lint.pylint.max-branches = 20 # default: 12 |
| 97 | +lint.pylint.max-returns = 8 # default: 6 |
| 98 | +lint.pylint.max-statements = 88 # default: 50 |
| 99 | +lint.ignore = [ |
| 100 | + # `ruff rule S101` for a description of that rule |
| 101 | + "B904", # Within an `except` clause, raise exceptions with `raise ... from err` -- FIX ME |
| 102 | + "B905", # `zip()` without an explicit `strict=` parameter -- FIX ME |
| 103 | + "EM101", # Exception must not use a string literal, assign to variable first |
| 104 | + "EXE001", # Shebang is present but file is not executable -- DO NOT FIX |
| 105 | + "G004", # Logging statement uses f-string |
| 106 | + "PLC1901", # `{}` can be simplified to `{}` as an empty string is falsey |
| 107 | + "PLW060", # Using global for `{name}` but no assignment is done -- DO NOT FIX |
| 108 | + "PLW2901", # PLW2901: Redefined loop variable -- FIX ME |
| 109 | + "PT011", # `pytest.raises(Exception)` is too broad, set the `match` parameter or use a more specific exception |
| 110 | + "PT018", # Assertion should be broken down into multiple parts |
| 111 | + "S101", # Use of `assert` detected -- DO NOT FIX |
| 112 | + "S311", # Standard pseudo-random generators are not suitable for cryptographic purposes -- FIX ME |
| 113 | + "SLF001", # Private member accessed: `_Iterator` -- FIX ME |
| 114 | + "UP038", # Use `X | Y` in `{}` call instead of `(X, Y)` -- DO NOT FIX |
| 115 | +] |
119 | 116 |
|
120 | 117 | [tool.codespell]
|
121 | 118 | ignore-words-list = "3rt,ans,bitap,crate,damon,fo,followings,hist,iff,kwanza,manuel,mater,secant,som,sur,tim,toi,zar"
|
|
0 commit comments