Skip to content

Commit

Permalink
Fix flake8 complaint: use 'is' for type comarisons
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Aug 1, 2023
1 parent 6739956 commit b9c1948
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pudb/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ def __ne__(self, other):

class NullSourceCodeProvider(SourceCodeProvider):
def __eq__(self, other):
return type(self) == type(other)
return type(self) is type(other)

def identifier(self):
return "<no source code>"
Expand Down Expand Up @@ -691,7 +691,7 @@ def __init__(self, debugger, file_name):
self.file_name = debugger.canonic(file_name)

def __eq__(self, other):
return type(self) == type(other) and self.file_name == other.file_name
return type(self) is type(other) and self.file_name == other.file_name

def identifier(self):
return self.file_name
Expand Down Expand Up @@ -736,7 +736,7 @@ def __init__(self, func_name, code):

def __eq__(self, other):
return (
type(self) == type(other)
type(self) is type(other)
and self.function_name == other.function_name
and self.code is other.code)

Expand Down

0 comments on commit b9c1948

Please sign in to comment.