Skip to content

Commit 465a795

Browse files
pre-commit-ci[bot]cclauss
authored andcommitted
[pre-commit.ci] pre-commit autoupdate (TheAlgorithms#11408)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/tox-dev/pyproject-fmt: 2.0.4 → 2.1.1](tox-dev/pyproject-fmt@2.0.4...2.1.1) - [github.com/abravalheri/validate-pyproject: v0.17 → v0.18](abravalheri/validate-pyproject@v0.17...v0.18) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 996bb12 commit 465a795

File tree

2 files changed

+40
-43
lines changed

2 files changed

+40
-43
lines changed

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repos:
2929
- tomli
3030

3131
- repo: https://github.com/tox-dev/pyproject-fmt
32-
rev: "2.0.4"
32+
rev: "2.1.1"
3333
hooks:
3434
- id: pyproject-fmt
3535

@@ -42,7 +42,7 @@ repos:
4242
pass_filenames: false
4343

4444
- repo: https://github.com/abravalheri/validate-pyproject
45-
rev: v0.17
45+
rev: v0.18
4646
hooks:
4747
- id: validate-pyproject
4848

pyproject.toml

+38-41
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
[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
197
"A", # flake8-builtins
208
"ARG", # flake8-unused-arguments
219
"ASYNC", # flake8-async
@@ -68,54 +56,63 @@ lint.select = [ # https://beta.ruff.rs/docs/rules
6856
# "TCH", # flake8-type-checking
6957
# "TRY", # tryceratops
7058
]
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" = [
7960
"PGH001",
8061
]
81-
"data_structures/binary_tree/binary_search_tree_recursive.py" = [
62+
lint.per-file-ignores."data_structures/binary_tree/binary_search_tree_recursive.py" = [
8263
"BLE001",
8364
]
84-
"data_structures/hashing/tests/test_hash_map.py" = [
65+
lint.per-file-ignores."data_structures/hashing/tests/test_hash_map.py" = [
8566
"BLE001",
8667
]
87-
"hashes/enigma_machine.py" = [
68+
lint.per-file-ignores."hashes/enigma_machine.py" = [
8869
"BLE001",
8970
]
90-
"machine_learning/sequential_minimum_optimization.py" = [
71+
lint.per-file-ignores."machine_learning/sequential_minimum_optimization.py" = [
9172
"SIM115",
9273
]
93-
"matrix/sherman_morrison.py" = [
74+
lint.per-file-ignores."matrix/sherman_morrison.py" = [
9475
"SIM103",
9576
]
96-
"other/l*u_cache.py" = [
77+
lint.per-file-ignores."other/l*u_cache.py" = [
9778
"RUF012",
9879
]
99-
"physics/newtons_second_law_of_motion.py" = [
80+
lint.per-file-ignores."physics/newtons_second_law_of_motion.py" = [
10081
"BLE001",
10182
]
102-
"project_euler/problem_099/sol1.py" = [
83+
lint.per-file-ignores."project_euler/problem_099/sol1.py" = [
10384
"SIM115",
10485
]
105-
"sorts/external_sort.py" = [
86+
lint.per-file-ignores."sorts/external_sort.py" = [
10687
"SIM115",
10788
]
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 = [
11191
"float",
11292
"int",
11393
"str",
11494
]
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+
]
119116

120117
[tool.codespell]
121118
ignore-words-list = "3rt,ans,bitap,crate,damon,fo,followings,hist,iff,kwanza,manuel,mater,secant,som,sur,tim,toi,zar"

0 commit comments

Comments
 (0)