From c99fa06049bd3422d7e99a9b03b698c8d21afe0a Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Mon, 5 Sep 2022 08:40:26 -0500 Subject: [PATCH 1/2] build(deps): Add flake8-comprehensions See also: https://github.com/adamchainz/flake8-comprehensions --- poetry.lock | 17 ++++++++++++++++- pyproject.toml | 3 ++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index b6014a96a..7447288ca 100644 --- a/poetry.lock +++ b/poetry.lock @@ -195,6 +195,17 @@ flake8 = ">=3.0.0" [package.extras] dev = ["coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit"] +[[package]] +name = "flake8-comprehensions" +version = "3.10.0" +description = "A flake8 plugin to help you write better list/set/dict comprehensions." +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +flake8 = ">=3.0,<3.2.0 || >3.2.0" + [[package]] name = "furo" version = "2022.6.21" @@ -950,7 +961,7 @@ test = [] [metadata] lock-version = "1.1" python-versions = "^3.9" -content-hash = "b4ff6d1c756080252c89af87b3865226d2dcde1f259990e69abd4f5b66881086" +content-hash = "2594a105608fb4e0cc1dad2d950811c7efc54b8dd3b3803cf21937247448580a" [metadata.files] alabaster = [ @@ -1087,6 +1098,10 @@ flake8-bugbear = [ {file = "flake8-bugbear-22.8.23.tar.gz", hash = "sha256:de0717d11124a082118dd08387b34fd86b2721642ec2d8e92be66cfa5ea7c445"}, {file = "flake8_bugbear-22.8.23-py3-none-any.whl", hash = "sha256:1b0ebe0873d1cd55bf9f1588bfcb930db339018ef44a3981a26532daa9fd14a8"}, ] +flake8-comprehensions = [ + {file = "flake8-comprehensions-3.10.0.tar.gz", hash = "sha256:181158f7e7aa26a63a0a38e6017cef28c6adee71278ce56ce11f6ec9c4905058"}, + {file = "flake8_comprehensions-3.10.0-py3-none-any.whl", hash = "sha256:dad454fd3d525039121e98fa1dd90c46bc138708196a4ebbc949ad3c859adedb"}, +] furo = [ {file = "furo-2022.6.21-py3-none-any.whl", hash = "sha256:061b68e323345e27fcba024cf33a1e77f3dfd8d9987410be822749a706e2add6"}, {file = "furo-2022.6.21.tar.gz", hash = "sha256:9aa983b7488a4601d13113884bfb7254502c8729942e073a0acb87a5512af223"}, diff --git a/pyproject.toml b/pyproject.toml index 01dc0b08d..270cbc1d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -94,6 +94,7 @@ isort = "*" ### Lint ### flake8 = "*" flake8-bugbear = "^22.8.23" +flake8-comprehensions = "*" mypy = "*" [tool.poetry.extras] @@ -119,7 +120,7 @@ test = [ ] coverage = ["codecov", "coverage", "pytest-cov"] format = ["black", "isort"] -lint = ["flake8", "flake8-bugbear", "mypy"] +lint = ["flake8", "flake8-bugbear", "flake8-comprehensions", "mypy"] [tool.mypy] strict = true From c6fad518f8617fa03777475c7dfd86b94af2c39e Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Mon, 5 Sep 2022 08:43:40 -0500 Subject: [PATCH 2/2] docs(CHANGES): Note flake8-comprehensions --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index 1e8d5244b..4398d4ba1 100644 --- a/CHANGES +++ b/CHANGES @@ -25,6 +25,7 @@ $ pip install --user --upgrade --pre libvcs - Remove `.pre-commit-config.yaml`: This can be done less obtrusively via flake8 and having the user run the tools themselves. - Add [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) (#379) +- Add [flake8-comprehensions](https://github.com/adamchainz/flake8-comprehensions) (#402) ### Documentation