From a3c7974703e416674cb0f39f648fbc0c730a128d Mon Sep 17 00:00:00 2001 From: Nuno Fachada Date: Tue, 20 Jun 2023 11:19:42 +0100 Subject: [PATCH] Fix issue with zip(..., strict=...) for Python < 3.10 Also: updated Flake8 exceptions, which are related with the fixed issue --- pyclugen/main.py | 2 +- pyproject.toml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pyclugen/main.py b/pyclugen/main.py index 82384f1..f733e5b 100644 --- a/pyclugen/main.py +++ b/pyclugen/main.py @@ -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] diff --git a/pyproject.toml b/pyproject.toml index 5845990..8aca6c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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",