Skip to content

Commit

Permalink
Fix issue with zip(..., strict=...) for Python < 3.10
Browse files Browse the repository at this point in the history
Also: updated Flake8 exceptions, which are related with the
fixed issue
  • Loading branch information
nunofachada committed Jun 20, 2023
1 parent 82cbde5 commit a3c7974
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyclugen/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ def clumerge(
new_clusters = list(
range(last_cluster + 1, last_cluster + len(old_clusters) + 1)
)
old2new = zip(old_clusters, new_clusters, strict=True) # type: ignore
old2new = zip(old_clusters, new_clusters)
mapping = dict(old2new)
last_cluster = new_clusters[-1]

Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ skip_gitignore = "True"
extend-select = ["B9", "C4"]
max-line-length = 88
max-doc-length = 88
ignore = [ "B018", "E203", "SIM106", "W503" ]
ignore = [
"B905", # Force `strict` in zip(), but this requires Python 3.10
"E203", # "whitespace before ':'"", but that's how black likes it
"W503" ] # "line break before binary operator", conflicts with black

doctests = true
exclude = [
".git",
Expand Down

0 comments on commit a3c7974

Please sign in to comment.