From b9c19487fa2d85c3da2eabcfa79f6732df4fe79d Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 1 Aug 2023 01:01:54 -0500 Subject: [PATCH] Fix flake8 complaint: use 'is' for type comarisons --- pudb/debugger.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pudb/debugger.py b/pudb/debugger.py index 947724e5..676fdb7b 100644 --- a/pudb/debugger.py +++ b/pudb/debugger.py @@ -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 "" @@ -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 @@ -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)