Add __eq__ to SolidityImportPlaceHolder

pull/728/head
Josselin 4 years ago
parent 72738bc679
commit d1eee22723
  1. 7
      slither/core/declarations/solidity_variables.py

@ -204,6 +204,13 @@ class SolidityImportPlaceHolder(SolidityVariable):
def type(self) -> ElementaryType:
return ElementaryType("string")
def __eq__(self, other):
return (
self.__class__ == other.__class__
and self.name == other.name
and self._import_directive.filename == self._import_directive.filename
)
@property
def import_directive(self) -> "Import":
return self._import_directive

Loading…
Cancel
Save