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:
Andrey 2022-10-29 16:07:02 +03:00 committed by GitHub
parent 18ffc4dec8
commit 584e743422
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 9 deletions

View File

@ -41,13 +41,19 @@ repos:
rev: 5.0.4
hooks:
- id: flake8 # See .flake8 for args
additional_dependencies:
additional_dependencies: &flake8-plugins
- flake8-bugbear
- flake8-builtins
- flake8-broken-line
- flake8-comprehensions
- 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
rev: v0.982

View File

@ -356,14 +356,14 @@
* [Articulation Points](graphs/articulation_points.py)
* [Basic Graphs](graphs/basic_graphs.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 Breadth First Search](graphs/bidirectional_breadth_first_search.py)
* [Boruvka](graphs/boruvka.py)
* [Breadth First Search](graphs/breadth_first_search.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 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 Dfs](graphs/check_bipartite_graph_dfs.py)
* [Check Cycle](graphs/check_cycle.py)
@ -678,6 +678,7 @@
* [N Body Simulation](physics/n_body_simulation.py)
* [Newtons Law Of Gravitation](physics/newtons_law_of_gravitation.py)
* [Newtons Second Law Of Motion](physics/newtons_second_law_of_motion.py)
* [Potential Energy](physics/potential_energy.py)
## Project Euler
* Problem 001

View File

@ -103,7 +103,7 @@ class SegmentTree(Generic[T]):
>>> st.query(2, 3)
7
"""
l, r = l + self.N, r + self.N # noqa: E741
l, r = l + self.N, r + self.N
res: T | None = None
while l <= r: # noqa: E741

View File

@ -413,7 +413,7 @@ class IndexCalculation:
"""
return (self.nir / ((self.nir + self.red) / 2)) * (self.ndvi() + 1)
def i(self): # noqa: E741,E743
def i(self):
"""
Intensity
https://www.indexdatabase.de/db/i-single.php?id=36

View File

@ -80,7 +80,7 @@ def basic(target: str, genes: list[str], debug: bool = True) -> tuple[int, int,
score = len(
[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,
#

View File

@ -1,5 +1,3 @@
# flake8: noqa
"""
Sieve of Eratosthenes