python-werkzeug/backport-fix-flake8-bugbear-finding.patch
Bolehu e411186b28 fix flake8-bugbear finding
Signed-off-by: Bolehu <heyaohua@xfusion.com>
(cherry picked from commit ae719fd7788f168d08e903b0d94e3eca88295f6e)
2023-03-30 09:14:07 +08:00

28 lines
824 B
Diff

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