mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-24 05:21:09 +00:00
Fix yesqa hook (#7843)
* fix yesqa hook * Remove redundant noqa * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
parent
18ffc4dec8
commit
584e743422
|
@ -41,13 +41,19 @@ repos:
|
||||||
rev: 5.0.4
|
rev: 5.0.4
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8 # See .flake8 for args
|
- id: flake8 # See .flake8 for args
|
||||||
additional_dependencies:
|
additional_dependencies: &flake8-plugins
|
||||||
- flake8-bugbear
|
- flake8-bugbear
|
||||||
- flake8-builtins
|
- flake8-builtins
|
||||||
- flake8-broken-line
|
- flake8-broken-line
|
||||||
- flake8-comprehensions
|
- flake8-comprehensions
|
||||||
- pep8-naming
|
- pep8-naming
|
||||||
- yesqa
|
|
||||||
|
- repo: https://github.com/asottile/yesqa
|
||||||
|
rev: v1.4.0
|
||||||
|
hooks:
|
||||||
|
- id: yesqa
|
||||||
|
additional_dependencies:
|
||||||
|
*flake8-plugins
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
rev: v0.982
|
rev: v0.982
|
||||||
|
|
|
@ -356,14 +356,14 @@
|
||||||
* [Articulation Points](graphs/articulation_points.py)
|
* [Articulation Points](graphs/articulation_points.py)
|
||||||
* [Basic Graphs](graphs/basic_graphs.py)
|
* [Basic Graphs](graphs/basic_graphs.py)
|
||||||
* [Bellman Ford](graphs/bellman_ford.py)
|
* [Bellman Ford](graphs/bellman_ford.py)
|
||||||
* [Bfs Shortest Path](graphs/bfs_shortest_path.py)
|
|
||||||
* [Bfs Zero One Shortest Path](graphs/bfs_zero_one_shortest_path.py)
|
|
||||||
* [Bidirectional A Star](graphs/bidirectional_a_star.py)
|
* [Bidirectional A Star](graphs/bidirectional_a_star.py)
|
||||||
* [Bidirectional Breadth First Search](graphs/bidirectional_breadth_first_search.py)
|
* [Bidirectional Breadth First Search](graphs/bidirectional_breadth_first_search.py)
|
||||||
* [Boruvka](graphs/boruvka.py)
|
* [Boruvka](graphs/boruvka.py)
|
||||||
* [Breadth First Search](graphs/breadth_first_search.py)
|
* [Breadth First Search](graphs/breadth_first_search.py)
|
||||||
* [Breadth First Search 2](graphs/breadth_first_search_2.py)
|
* [Breadth First Search 2](graphs/breadth_first_search_2.py)
|
||||||
* [Breadth First Search Shortest Path](graphs/breadth_first_search_shortest_path.py)
|
* [Breadth First Search Shortest Path](graphs/breadth_first_search_shortest_path.py)
|
||||||
|
* [Breadth First Search Shortest Path 2](graphs/breadth_first_search_shortest_path_2.py)
|
||||||
|
* [Breadth First Search Zero One Shortest Path](graphs/breadth_first_search_zero_one_shortest_path.py)
|
||||||
* [Check Bipartite Graph Bfs](graphs/check_bipartite_graph_bfs.py)
|
* [Check Bipartite Graph Bfs](graphs/check_bipartite_graph_bfs.py)
|
||||||
* [Check Bipartite Graph Dfs](graphs/check_bipartite_graph_dfs.py)
|
* [Check Bipartite Graph Dfs](graphs/check_bipartite_graph_dfs.py)
|
||||||
* [Check Cycle](graphs/check_cycle.py)
|
* [Check Cycle](graphs/check_cycle.py)
|
||||||
|
@ -678,6 +678,7 @@
|
||||||
* [N Body Simulation](physics/n_body_simulation.py)
|
* [N Body Simulation](physics/n_body_simulation.py)
|
||||||
* [Newtons Law Of Gravitation](physics/newtons_law_of_gravitation.py)
|
* [Newtons Law Of Gravitation](physics/newtons_law_of_gravitation.py)
|
||||||
* [Newtons Second Law Of Motion](physics/newtons_second_law_of_motion.py)
|
* [Newtons Second Law Of Motion](physics/newtons_second_law_of_motion.py)
|
||||||
|
* [Potential Energy](physics/potential_energy.py)
|
||||||
|
|
||||||
## Project Euler
|
## Project Euler
|
||||||
* Problem 001
|
* Problem 001
|
||||||
|
|
|
@ -103,7 +103,7 @@ class SegmentTree(Generic[T]):
|
||||||
>>> st.query(2, 3)
|
>>> st.query(2, 3)
|
||||||
7
|
7
|
||||||
"""
|
"""
|
||||||
l, r = l + self.N, r + self.N # noqa: E741
|
l, r = l + self.N, r + self.N
|
||||||
|
|
||||||
res: T | None = None
|
res: T | None = None
|
||||||
while l <= r: # noqa: E741
|
while l <= r: # noqa: E741
|
||||||
|
|
|
@ -413,7 +413,7 @@ class IndexCalculation:
|
||||||
"""
|
"""
|
||||||
return (self.nir / ((self.nir + self.red) / 2)) * (self.ndvi() + 1)
|
return (self.nir / ((self.nir + self.red) / 2)) * (self.ndvi() + 1)
|
||||||
|
|
||||||
def i(self): # noqa: E741,E743
|
def i(self):
|
||||||
"""
|
"""
|
||||||
Intensity
|
Intensity
|
||||||
https://www.indexdatabase.de/db/i-single.php?id=36
|
https://www.indexdatabase.de/db/i-single.php?id=36
|
||||||
|
|
|
@ -80,7 +80,7 @@ def basic(target: str, genes: list[str], debug: bool = True) -> tuple[int, int,
|
||||||
score = len(
|
score = len(
|
||||||
[g for position, g in enumerate(item) if g == main_target[position]]
|
[g for position, g in enumerate(item) if g == main_target[position]]
|
||||||
)
|
)
|
||||||
return (item, float(score)) # noqa: B023
|
return (item, float(score))
|
||||||
|
|
||||||
# Adding a bit of concurrency can make everything faster,
|
# Adding a bit of concurrency can make everything faster,
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
# flake8: noqa
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Sieve of Eratosthenes
|
Sieve of Eratosthenes
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user