Skip to content

Commit 584e743

Browse files
Cjkjvfnbygithub-actions
and
github-actions
authored
Fix yesqa hook (TheAlgorithms#7843)
* fix yesqa hook * Remove redundant noqa * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
1 parent 18ffc4d commit 584e743

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

.pre-commit-config.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,19 @@ repos:
4141
rev: 5.0.4
4242
hooks:
4343
- id: flake8 # See .flake8 for args
44-
additional_dependencies:
44+
additional_dependencies: &flake8-plugins
4545
- flake8-bugbear
4646
- flake8-builtins
4747
- flake8-broken-line
4848
- flake8-comprehensions
4949
- pep8-naming
50-
- yesqa
50+
51+
- repo: https://github.com/asottile/yesqa
52+
rev: v1.4.0
53+
hooks:
54+
- id: yesqa
55+
additional_dependencies:
56+
*flake8-plugins
5157

5258
- repo: https://github.com/pre-commit/mirrors-mypy
5359
rev: v0.982

DIRECTORY.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -356,14 +356,14 @@
356356
* [Articulation Points](graphs/articulation_points.py)
357357
* [Basic Graphs](graphs/basic_graphs.py)
358358
* [Bellman Ford](graphs/bellman_ford.py)
359-
* [Bfs Shortest Path](graphs/bfs_shortest_path.py)
360-
* [Bfs Zero One Shortest Path](graphs/bfs_zero_one_shortest_path.py)
361359
* [Bidirectional A Star](graphs/bidirectional_a_star.py)
362360
* [Bidirectional Breadth First Search](graphs/bidirectional_breadth_first_search.py)
363361
* [Boruvka](graphs/boruvka.py)
364362
* [Breadth First Search](graphs/breadth_first_search.py)
365363
* [Breadth First Search 2](graphs/breadth_first_search_2.py)
366364
* [Breadth First Search Shortest Path](graphs/breadth_first_search_shortest_path.py)
365+
* [Breadth First Search Shortest Path 2](graphs/breadth_first_search_shortest_path_2.py)
366+
* [Breadth First Search Zero One Shortest Path](graphs/breadth_first_search_zero_one_shortest_path.py)
367367
* [Check Bipartite Graph Bfs](graphs/check_bipartite_graph_bfs.py)
368368
* [Check Bipartite Graph Dfs](graphs/check_bipartite_graph_dfs.py)
369369
* [Check Cycle](graphs/check_cycle.py)
@@ -678,6 +678,7 @@
678678
* [N Body Simulation](physics/n_body_simulation.py)
679679
* [Newtons Law Of Gravitation](physics/newtons_law_of_gravitation.py)
680680
* [Newtons Second Law Of Motion](physics/newtons_second_law_of_motion.py)
681+
* [Potential Energy](physics/potential_energy.py)
681682

682683
## Project Euler
683684
* Problem 001

data_structures/binary_tree/non_recursive_segment_tree.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def query(self, l: int, r: int) -> T | None: # noqa: E741
103103
>>> st.query(2, 3)
104104
7
105105
"""
106-
l, r = l + self.N, r + self.N # noqa: E741
106+
l, r = l + self.N, r + self.N
107107

108108
res: T | None = None
109109
while l <= r: # noqa: E741

digital_image_processing/index_calculation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ def ipvi(self):
413413
"""
414414
return (self.nir / ((self.nir + self.red) / 2)) * (self.ndvi() + 1)
415415

416-
def i(self): # noqa: E741,E743
416+
def i(self):
417417
"""
418418
Intensity
419419
https://www.indexdatabase.de/db/i-single.php?id=36

genetic_algorithm/basic_string.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def evaluate(item: str, main_target: str = target) -> tuple[str, float]:
8080
score = len(
8181
[g for position, g in enumerate(item) if g == main_target[position]]
8282
)
83-
return (item, float(score)) # noqa: B023
83+
return (item, float(score))
8484

8585
# Adding a bit of concurrency can make everything faster,
8686
#

maths/prime_sieve_eratosthenes.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# flake8: noqa
2-
31
"""
42
Sieve of Eratosthenes
53

0 commit comments

Comments
 (0)