From 15930be644d97dd5d1c133b50c92d5ae411306f6 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 8 Aug 2023 08:44:03 +1000 Subject: [PATCH] Use "is" when comparing types --- src/PIL/ImageMath.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/ImageMath.py b/src/PIL/ImageMath.py index ac7d36b698c..eb6bbe6c62e 100644 --- a/src/PIL/ImageMath.py +++ b/src/PIL/ImageMath.py @@ -247,7 +247,7 @@ def eval(expression, _dict={}, **kw): def scan(code): for const in code.co_consts: - if type(const) == type(compiled_code): + if type(const) is type(compiled_code): scan(const) for name in code.co_names: