!30 [sync] PR-27: fix flake8-bugbear finding
From: @openeuler-sync-bot Reviewed-by: @caodongxia Signed-off-by: @caodongxia
This commit is contained in:
commit
0cc8798cf3
27
backport-fix-flake8-bugbear-finding.patch
Normal file
27
backport-fix-flake8-bugbear-finding.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From fd4556941d9f3c812b15eab715ccc72a365cf69c Mon Sep 17 00:00:00 2001
|
||||
From: David Lord <davidism@gmail.com>
|
||||
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
|
||||
|
||||
@ -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
|
||||
@ -177,6 +178,9 @@ export PYTHONPATH=$PYTHONPATH:$depath
|
||||
%{_docdir}/*
|
||||
|
||||
%changelog
|
||||
* Mon Jan 9 2023 Bolehu <heyaohua@xfusion.com> - 2.0.3-3
|
||||
- fix flake8-bugbear finding
|
||||
|
||||
* Sat Jan 7 2023 Bolehu <heyaohua@xfusion.com> - 2.0.3-2
|
||||
- fix typo and grammar mistake
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user