Skip to content

Fix yesqa hook #7843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions DIRECTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion data_structures/binary_tree/non_recursive_segment_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def query(self, l: int, r: int) -> T | None: # noqa: E741
>>> 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
Expand Down
2 changes: 1 addition & 1 deletion digital_image_processing/index_calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def ipvi(self):
"""
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
Expand Down
2 changes: 1 addition & 1 deletion genetic_algorithm/basic_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def evaluate(item: str, main_target: str = target) -> tuple[str, float]:
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,
#
Expand Down
2 changes: 0 additions & 2 deletions maths/prime_sieve_eratosthenes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# flake8: noqa

"""
Sieve of Eratosthenes

Expand Down