From 8e0db3e565909ea6039278c29e2e85c9e8d176c7 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 3 Oct 2023 12:35:18 +0200 Subject: [PATCH] lint: flake prefers is on type comparison instead of == I think if a type chooses to overload __eq__ it should do so. --- reacton/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reacton/utils.py b/reacton/utils.py index 7242d83..f11c0d3 100644 --- a/reacton/utils.py +++ b/reacton/utils.py @@ -41,7 +41,8 @@ def equals(a, b): if a is b: return True - if type(a) != type(b): # is this always true? after a == b failed? + # ignore E721 for now + if type(a) != type(b): # noqa: E721 # is this always true? after a == b failed? return False if isinstance(a, Element): return same_component(a.component, b.component) and equals(a.args, b.args) and equals(a.kwargs, b.kwargs)