Skip to content

Commit b9c1948

Browse files
committed
Fix flake8 complaint: use 'is' for type comarisons
1 parent 6739956 commit b9c1948

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pudb/debugger.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ def __ne__(self, other):
655655

656656
class NullSourceCodeProvider(SourceCodeProvider):
657657
def __eq__(self, other):
658-
return type(self) == type(other)
658+
return type(self) is type(other)
659659

660660
def identifier(self):
661661
return "<no source code>"
@@ -691,7 +691,7 @@ def __init__(self, debugger, file_name):
691691
self.file_name = debugger.canonic(file_name)
692692

693693
def __eq__(self, other):
694-
return type(self) == type(other) and self.file_name == other.file_name
694+
return type(self) is type(other) and self.file_name == other.file_name
695695

696696
def identifier(self):
697697
return self.file_name
@@ -736,7 +736,7 @@ def __init__(self, func_name, code):
736736

737737
def __eq__(self, other):
738738
return (
739-
type(self) == type(other)
739+
type(self) is type(other)
740740
and self.function_name == other.function_name
741741
and self.code is other.code)
742742

0 commit comments

Comments
 (0)