From 2bbafaee98035e60b4f7f0036fa226174c6d187a Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 3 Sep 2022 22:05:36 -0500 Subject: [PATCH 1/2] build(deps): Add flake8-bugbear See also: https://github.com/PyCQA/flake8-bugbear --- poetry.lock | 21 ++++++++++++++++++++- pyproject.toml | 3 ++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index 43f05bd8b..fcad4e9b2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -180,6 +180,21 @@ mccabe = ">=0.7.0,<0.8.0" pycodestyle = ">=2.9.0,<2.10.0" pyflakes = ">=2.5.0,<2.6.0" +[[package]] +name = "flake8-bugbear" +version = "22.8.23" +description = "A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle." +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +attrs = ">=19.2.0" +flake8 = ">=3.0.0" + +[package.extras] +dev = ["coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit"] + [[package]] name = "furo" version = "2022.6.21" @@ -935,7 +950,7 @@ test = [] [metadata] lock-version = "1.1" python-versions = "^3.9" -content-hash = "0abb9212fca45b0e9f94a5d2df91c55129fe1c99931b30e3043a78c5dd3ed426" +content-hash = "e47693ce7613bd42f05b1e85a51c044c05bd43683b265a7e32672c7b96c090f4" [metadata.files] alabaster = [ @@ -1068,6 +1083,10 @@ flake8 = [ {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"}, {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"}, ] +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"}, +] 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 9f01b73bd..01dc0b08d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,6 +93,7 @@ isort = "*" ### Lint ### flake8 = "*" +flake8-bugbear = "^22.8.23" mypy = "*" [tool.poetry.extras] @@ -118,7 +119,7 @@ test = [ ] coverage = ["codecov", "coverage", "pytest-cov"] format = ["black", "isort"] -lint = ["flake8", "mypy"] +lint = ["flake8", "flake8-bugbear", "mypy"] [tool.mypy] strict = true From 16a424dc1c0b51099eac36f618754d518da849f0 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 3 Sep 2022 22:26:54 -0500 Subject: [PATCH 2/2] docs(CHANGES): Note addition of flake8-bugbear --- CHANGES | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index e891488c3..1e8d5244b 100644 --- a/CHANGES +++ b/CHANGES @@ -17,12 +17,14 @@ $ pip install --user --upgrade --pre libvcs - Deprecate custom functions in favor of standard library: - `which()` in favor of {func}`shutil.which`, via #397 - - `mkdir_p()` in favor of {func}`os.makedirs` and {meth}`pathlib.Path.mkdir` w/ `parents=True`, via #399 + - `mkdir_p()` in favor of {func}`os.makedirs` and {meth}`pathlib.Path.mkdir` w/ `parents=True`, + via #399 ### Development - 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) ### Documentation