From 7e891147e31b22fd6a2cceb6841ae622203039eb Mon Sep 17 00:00:00 2001 From: Bolehu Date: Sat, 7 Jan 2023 00:47:35 +0800 Subject: [PATCH] fix flake8-bugbear finding Signed-off-by: Bolehu --- backport-fix-flake8-bugbear-finding.patch | 27 +++++++++++++++++++++++ python-werkzeug.spec | 6 ++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 backport-fix-flake8-bugbear-finding.patch diff --git a/backport-fix-flake8-bugbear-finding.patch b/backport-fix-flake8-bugbear-finding.patch new file mode 100644 index 0000000..fc9370c --- /dev/null +++ b/backport-fix-flake8-bugbear-finding.patch @@ -0,0 +1,27 @@ +From fd4556941d9f3c812b15eab715ccc72a365cf69c Mon Sep 17 00:00:00 2001 +From: David Lord +Date: Mon, 4 Apr 2022 10:59:19 -0700 +Subject: [PATCH] fix flake8-bugbear finding + +--- + src/werkzeug/debug/repr.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/werkzeug/debug/repr.py b/src/werkzeug/debug/repr.py +index 7d847b03..3cc45d5d 100644 +--- a/src/werkzeug/debug/repr.py ++++ b/src/werkzeug/debug/repr.py +@@ -83,8 +83,8 @@ def _add_subclass_info( + inner: str, obj: object, base: t.Union[t.Type, t.Tuple[t.Type, ...]] + ) -> str: + if isinstance(base, tuple): +- for base in base: +- if type(obj) is base: ++ for cls in base: ++ if type(obj) is cls: + return inner + elif type(obj) is base: + return inner +-- +2.33.0 + diff --git a/python-werkzeug.spec b/python-werkzeug.spec index 6a92508..bd94d94 100644 --- a/python-werkzeug.spec +++ b/python-werkzeug.spec @@ -1,13 +1,14 @@ %global _empty_manifest_terminate_build 0 Name: python-werkzeug Version: 2.0.3 -Release: 2 +Release: 3 Summary: The comprehensive WSGI web application library. License: BSD-3-Clause URL: https://palletsprojects.com/p/werkzeug/ Source0: https://files.pythonhosted.org/packages/6c/a8/60514fade2318e277453c9588545d0c335ea3ea6440ce5cdabfca7f73117/Werkzeug-2.0.3.tar.gz Patch0001: backport-fix-typo-and-grammar-mistake.patch +Patch0002: backport-fix-flake8-bugbear-finding.patch BuildArch: noarch BuildRequires: python3-werkzeug @@ -170,6 +171,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} pytest -k "not (test_reloader_sys_path %{_docdir}/* %changelog +* Mon Jan 9 2023 Bolehu - 2.0.3-3 +- fix flake8-bugbear finding + * Sat Jan 7 2023 Bolehu - 2.0.3-2 - fix typo and grammar mistake -- Gitee