Skip to content

Commit 82aa909

Browse files
[pre-commit.ci] pre-commit autoupdate (TheAlgorithms#11417)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.4 → v0.4.5](astral-sh/ruff-pre-commit@v0.4.4...v0.4.5) - [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](codespell-project/codespell@v2.2.6...v2.3.0) - [github.com/tox-dev/pyproject-fmt: 2.1.1 → 2.1.3](tox-dev/pyproject-fmt@2.1.1...2.1.3) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * iterable * at most --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <[email protected]>
1 parent 0139143 commit 82aa909

File tree

4 files changed

+23
-22
lines changed

4 files changed

+23
-22
lines changed

.pre-commit-config.yaml

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

1818
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.4.4
19+
rev: v0.4.5
2020
hooks:
2121
- id: ruff
2222
- id: ruff-format
2323

2424
- repo: https://github.com/codespell-project/codespell
25-
rev: v2.2.6
25+
rev: v2.3.0
2626
hooks:
2727
- id: codespell
2828
additional_dependencies:
2929
- tomli
3030

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

graphs/dijkstra_algorithm.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def decrease_key(self, tup, new_d):
215215
[(5, 'A'), (15, 'B')]
216216
"""
217217
idx = self.pos[tup[1]]
218-
# assuming the new_d is atmost old_d
218+
# assuming the new_d is at most old_d
219219
self.array[idx] = (new_d, tup[1])
220220
while idx > 0 and self.array[self.par(idx)][0] > self.array[idx][0]:
221221
self.swap(idx, self.par(idx))

project_euler/problem_047/sol1.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def upf_len(num: int) -> int:
5858

5959
def equality(iterable: list) -> bool:
6060
"""
61-
Check equality of ALL elements in an interable.
61+
Check equality of ALL elements in an iterable
6262
>>> equality([1, 2, 3, 4])
6363
False
6464
>>> equality([2, 2, 2, 2])

pyproject.toml

+18-17
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,24 @@ lint.select = [
5656
# "TCH", # flake8-type-checking
5757
# "TRY", # tryceratops
5858
]
59+
lint.ignore = [
60+
# `ruff rule S101` for a description of that rule
61+
"B904", # Within an `except` clause, raise exceptions with `raise ... from err` -- FIX ME
62+
"B905", # `zip()` without an explicit `strict=` parameter -- FIX ME
63+
"EM101", # Exception must not use a string literal, assign to variable first
64+
"EXE001", # Shebang is present but file is not executable -- DO NOT FIX
65+
"G004", # Logging statement uses f-string
66+
"PLC1901", # `{}` can be simplified to `{}` as an empty string is falsey
67+
"PLW060", # Using global for `{name}` but no assignment is done -- DO NOT FIX
68+
"PLW2901", # PLW2901: Redefined loop variable -- FIX ME
69+
"PT011", # `pytest.raises(Exception)` is too broad, set the `match` parameter or use a more specific exception
70+
"PT018", # Assertion should be broken down into multiple parts
71+
"S101", # Use of `assert` detected -- DO NOT FIX
72+
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes -- FIX ME
73+
"SLF001", # Private member accessed: `_Iterator` -- FIX ME
74+
"UP038", # Use `X | Y` in `{}` call instead of `(X, Y)` -- DO NOT FIX
75+
]
76+
5977
lint.per-file-ignores."arithmetic_analysis/newton_raphson.py" = [
6078
"PGH001",
6179
]
@@ -96,23 +114,6 @@ lint.pylint.max-args = 10 # default: 5
96114
lint.pylint.max-branches = 20 # default: 12
97115
lint.pylint.max-returns = 8 # default: 6
98116
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-
]
116117

117118
[tool.codespell]
118119
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)