Skip to content

Commit

Permalink
Add __eq__ to SolidityImportPlaceHolder
Browse files Browse the repository at this point in the history
  • Loading branch information
montyly committed Dec 17, 2020
1 parent 72738bc commit d1eee22
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions slither/core/declarations/solidity_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,13 @@ def _check_name(self, name: str):
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

0 comments on commit d1eee22

Please sign in to comment.