Skip to content

Commit bae33a0

Browse files
pre-commit-ci[bot]sedatguzelsemme
authored andcommitted
[pre-commit.ci] pre-commit autoupdate (TheAlgorithms#11402)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.3 → v0.4.4](astral-sh/ruff-pre-commit@v0.4.3...v0.4.4) - [github.com/tox-dev/pyproject-fmt: 1.8.0 → 2.0.4](tox-dev/pyproject-fmt@1.8.0...2.0.4) - [github.com/abravalheri/validate-pyproject: v0.16 → v0.17](abravalheri/validate-pyproject@v0.16...v0.17) * [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 1f2410e commit bae33a0

File tree

2 files changed

+107
-83
lines changed

2 files changed

+107
-83
lines changed

Diff for: .pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
- id: auto-walrus
1717

1818
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.4.3
19+
rev: v0.4.4
2020
hooks:
2121
- id: ruff
2222
- id: ruff-format
@@ -29,7 +29,7 @@ repos:
2929
- tomli
3030

3131
- repo: https://github.com/tox-dev/pyproject-fmt
32-
rev: "1.8.0"
32+
rev: "2.0.4"
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.16
45+
rev: v0.17
4646
hooks:
4747
- id: validate-pyproject
4848

Diff for: pyproject.toml

+104-80
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
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
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
5959
# "ANN", # flake8-annotations # FIX ME?
6060
# "COM", # flake8-commas
6161
# "D", # pydocstyle -- FIX ME?
@@ -71,45 +71,69 @@ lint.select = [ # https://beta.ruff.rs/docs/rules
7171
output-format = "full"
7272
target-version = "py312"
7373

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
7676

7777
[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+
]
88108

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
95119

96120
[tool.codespell]
97121
ignore-words-list = "3rt,ans,bitap,crate,damon,fo,followings,hist,iff,kwanza,manuel,mater,secant,som,sur,tim,toi,zar"
98122
skip = "./.*,*.json,ciphers/prehistoric_men.txt,project_euler/problem_022/p022_names.txt,pyproject.toml,strings/dictionary.txt,strings/words.txt"
99123

100124
[tool.pytest.ini_options]
101125
markers = [
102-
"mat_ops: mark a test as utilizing matrix operations.",
126+
"mat_ops: mark a test as utilizing matrix operations.",
103127
]
104128
addopts = [
105-
"--durations=10",
106-
"--doctest-modules",
107-
"--showlocals",
129+
"--durations=10",
130+
"--doctest-modules",
131+
"--showlocals",
108132
]
109133

110134
[tool.coverage.report]
111135
omit = [
112136
".env/*",
113-
"project_euler/*"
137+
"project_euler/*",
114138
]
115139
sort = "Cover"

0 commit comments

Comments
 (0)