From cc00587ddf9b7469b4e43e40bdf04b63cdf4d830 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Oct 2021 21:16:28 +0000 Subject: [PATCH 1/2] Bump flake8-bugbear from 21.4.3 to 21.9.2 Bumps [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) from 21.4.3 to 21.9.2. - [Release notes](https://github.com/PyCQA/flake8-bugbear/releases) - [Commits](https://github.com/PyCQA/flake8-bugbear/compare/21.4.3...21.9.2) --- updated-dependencies: - dependency-name: flake8-bugbear dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 929b7e4..ce181a7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -276,7 +276,7 @@ pycodestyle = "*" [[package]] name = "flake8-bugbear" -version = "21.4.3" +version = "21.9.2" 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 @@ -1055,7 +1055,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pyt [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "7ee3217a88db52a84ba62a27795d0a149db16d77be5501351940f252fec031db" +content-hash = "1ece2960aca29fd8e3e4a70da0a82eaa568e80c0c51797be03e76500f8877d6c" [metadata.files] alabaster = [ @@ -1185,8 +1185,8 @@ flake8-bandit = [ {file = "flake8_bandit-2.1.2.tar.gz", hash = "sha256:687fc8da2e4a239b206af2e54a90093572a60d0954f3054e23690739b0b0de3b"}, ] flake8-bugbear = [ - {file = "flake8-bugbear-21.4.3.tar.gz", hash = "sha256:2346c81f889955b39e4a368eb7d508de723d9de05716c287dc860a4073dc57e7"}, - {file = "flake8_bugbear-21.4.3-py36.py37.py38-none-any.whl", hash = "sha256:4f305dca96be62bf732a218fe6f1825472a621d3452c5b994d8f89dae21dbafa"}, + {file = "flake8-bugbear-21.9.2.tar.gz", hash = "sha256:db9a09893a6c649a197f5350755100bb1dd84f110e60cf532fdfa07e41808ab2"}, + {file = "flake8_bugbear-21.9.2-py36.py37.py38-none-any.whl", hash = "sha256:4f7eaa6f05b7d7ea4cbbde93f7bcdc5438e79320fa1ec420d860c181af38b769"}, ] flake8-docstrings = [ {file = "flake8-docstrings-1.6.0.tar.gz", hash = "sha256:9fe7c6a306064af8e62a055c2f61e9eb1da55f84bb39caef2b84ce53708ac34b"}, diff --git a/pyproject.toml b/pyproject.toml index e1008a1..3a2b37e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ django = ">=2.0" black = "^21.9b0" flake8 = "^4.0.1" flake8-bandit = "^2.1.2" -flake8-bugbear = "^21.4.3" +flake8-bugbear = "^21.9.2" safety = "^1.10.3" pytest = "^6.2.5" mypy = "^0.910" From fb67383858001de36e4148e717d5e08fd7c07450 Mon Sep 17 00:00:00 2001 From: staticdev Date: Sat, 16 Oct 2021 17:27:47 +0200 Subject: [PATCH 2/2] Fix bugbear exception chaining --- noxfile.py | 2 +- src/django_sorting_bootstrap/templatetags/sorting_tags.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index 0eff0f9..4e07de1 100644 --- a/noxfile.py +++ b/noxfile.py @@ -14,7 +14,7 @@ Nox failed to import the 'nox-poetry' package. Please install it using the following command: {sys.executable} -m pip install nox-poetry""" - raise SystemExit(dedent(message)) + raise SystemExit(dedent(message)) from None package = "django_sorting_bootstrap" diff --git a/src/django_sorting_bootstrap/templatetags/sorting_tags.py b/src/django_sorting_bootstrap/templatetags/sorting_tags.py index 7fdf0f3..8e46e02 100644 --- a/src/django_sorting_bootstrap/templatetags/sorting_tags.py +++ b/src/django_sorting_bootstrap/templatetags/sorting_tags.py @@ -174,7 +174,7 @@ def auto_sort(parser, token): except ValueError: raise template.TemplateSyntaxError( "{} tag requires a single argument".format(token.contents.split()[0]) - ) + ) from None return SortedQuerysetNode(queryset)