Skip to content

Commit 756bb26

Browse files
[pre-commit.ci] pre-commit autoupdate (#6629)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 22.6.0 → 22.8.0](psf/black@22.6.0...22.8.0) - [github.com/asottile/pyupgrade: v2.37.0 → v2.38.2](asottile/pyupgrade@v2.37.0...v2.38.2) - https://gitlab.com/pycqa/flake8https://github.com/PyCQA/flake8 - [github.com/PyCQA/flake8: 3.9.2 → 5.0.4](PyCQA/flake8@3.9.2...5.0.4) - [github.com/pre-commit/mirrors-mypy: v0.961 → v0.981](pre-commit/mirrors-mypy@v0.961...v0.981) - [github.com/codespell-project/codespell: v2.1.0 → v2.2.1](codespell-project/codespell@v2.1.0...v2.2.1) * Fix a long line * Update sol1.py * Update sol1.py * lambda_ * Update multi_level_feedback_queue.py * Update double_ended_queue.py * Update sequential_minimum_optimization.py * Update .pre-commit-config.yaml 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 e9862ad commit 756bb26

File tree

8 files changed

+20
-19
lines changed

8 files changed

+20
-19
lines changed

Diff for: .pre-commit-config.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repos:
1414
- id: requirements-txt-fixer
1515

1616
- repo: https://github.com/psf/black
17-
rev: 22.6.0
17+
rev: 22.8.0
1818
hooks:
1919
- id: black
2020

@@ -26,14 +26,14 @@ repos:
2626
- --profile=black
2727

2828
- repo: https://github.com/asottile/pyupgrade
29-
rev: v2.37.0
29+
rev: v2.38.2
3030
hooks:
3131
- id: pyupgrade
3232
args:
3333
- --py310-plus
3434

35-
- repo: https://gitlab.com/pycqa/flake8
36-
rev: 3.9.2
35+
- repo: https://github.com/PyCQA/flake8
36+
rev: 5.0.4
3737
hooks:
3838
- id: flake8
3939
args:
@@ -42,7 +42,7 @@ repos:
4242
- --max-line-length=88
4343

4444
- repo: https://github.com/pre-commit/mirrors-mypy
45-
rev: v0.961
45+
rev: v0.981
4646
hooks:
4747
- id: mypy
4848
args:
@@ -52,11 +52,11 @@ repos:
5252
additional_dependencies: [types-requests]
5353

5454
- repo: https://github.com/codespell-project/codespell
55-
rev: v2.1.0
55+
rev: v2.2.1
5656
hooks:
5757
- id: codespell
5858
args:
59-
- --ignore-words-list=ans,crate,fo,followings,hist,iff,mater,secant,som,sur,tim
59+
- --ignore-words-list=ans,crate,damon,fo,followings,hist,iff,mater,secant,som,sur,tim,zar
6060
- --skip="./.*,./strings/dictionary.txt,./strings/words.txt,./project_euler/problem_022/p022_names.txt"
6161
exclude: |
6262
(?x)^(

Diff for: data_structures/queue/double_ended_queue.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def __eq__(self, other: object) -> bool:
377377
me = self._front
378378
oth = other._front
379379

380-
# if the length of the deques are not the same, they are not equal
380+
# if the length of the dequeues are not the same, they are not equal
381381
if len(self) != len(other):
382382
return False
383383

Diff for: linear_algebra/src/power_iteration.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def power_iteration(
5252
# or when we have small changes from one iteration to next.
5353

5454
convergence = False
55-
lamda_previous = 0
55+
lambda_previous = 0
5656
iterations = 0
5757
error = 1e12
5858

@@ -64,21 +64,21 @@ def power_iteration(
6464
# Find rayleigh quotient
6565
# (faster than usual b/c we know vector is normalized already)
6666
vectorH = vector.conj().T if is_complex else vector.T
67-
lamda = np.dot(vectorH, np.dot(input_matrix, vector))
67+
lambda_ = np.dot(vectorH, np.dot(input_matrix, vector))
6868

6969
# Check convergence.
70-
error = np.abs(lamda - lamda_previous) / lamda
70+
error = np.abs(lambda_ - lambda_previous) / lambda_
7171
iterations += 1
7272

7373
if error <= error_tol or iterations >= max_iterations:
7474
convergence = True
7575

76-
lamda_previous = lamda
76+
lambda_previous = lambda_
7777

7878
if is_complex:
79-
lamda = np.real(lamda)
79+
lambda_ = np.real(lambda_)
8080

81-
return lamda, vector
81+
return lambda_, vector
8282

8383

8484
def test_power_iteration() -> None:

Diff for: machine_learning/sequential_minimum_optimization.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def fit(self):
145145
if self._is_unbound(i2):
146146
self._error[i2] = 0
147147

148-
# Predict test samles
148+
# Predict test samples
149149
def predict(self, test_samples, classify=True):
150150

151151
if test_samples.shape[1] > self.samples.shape[1]:

Diff for: project_euler/problem_045/sol1.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
It can be verified that T(285) = P(165) = H(143) = 40755.
99
1010
Find the next triangle number that is also pentagonal and hexagonal.
11-
All trinagle numbers are hexagonal numbers.
11+
All triangle numbers are hexagonal numbers.
1212
T(2n-1) = n * (2 * n - 1) = H(n)
1313
So we shall check only for hexagonal numbers which are also pentagonal.
1414
"""

Diff for: project_euler/problem_113/sol1.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def non_bouncy_upto(n: int) -> int:
6262

6363
def solution(num_digits: int = 100) -> int:
6464
"""
65-
Caclulate the number of non-bouncy numbers less than a googol.
65+
Calculate the number of non-bouncy numbers less than a googol.
6666
>>> solution(6)
6767
12951
6868
>>> solution(10)

Diff for: scheduling/multi_level_feedback_queue.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,6 @@ def multi_level_feedback_queue(self) -> deque[Process]:
307307
)
308308
# print sequence of finished processes
309309
print(
310-
f"sequnece of finished processes:\
310+
f"sequence of finished processes:\
311311
{mlfq.calculate_sequence_of_finish_queue()}"
312312
)

Diff for: web_programming/download_images_from_google_query.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515

1616
def download_images_from_google_query(query: str = "dhaka", max_images: int = 5) -> int:
17-
"""Searches google using the provided query term and downloads the images in a folder.
17+
"""
18+
Searches google using the provided query term and downloads the images in a folder.
1819
1920
Args:
2021
query : The image search term to be provided by the user. Defaults to

0 commit comments

Comments
 (0)