File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/algopy_testing/models Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -131,11 +131,13 @@ def __repr__(self) -> str:
131131 return self .public_key
132132
133133 def __eq__ (self , other : object ) -> bool :
134- if not isinstance (other , Account | str ):
135- raise TypeError ("Invalid value for Account" )
136- if isinstance (other , Account ):
137- return self ._public_key == other ._public_key
138- return self ._public_key == as_bytes (other )
134+ match other :
135+ case Account () as other_acc :
136+ return self ._public_key == other_acc ._public_key
137+ case str () as other_str :
138+ return self .public_key == other_str
139+ case _:
140+ return NotImplemented
139141
140142 def __bool__ (self ) -> bool :
141143 return bool (self ._public_key ) and self ._public_key != algosdk .encoding .decode_address (
You can’t perform that action at this time.
0 commit comments