Skip to content

Commit

Permalink
check for same class
Browse files Browse the repository at this point in the history
  • Loading branch information
egarciamendez committed Nov 24, 2024
1 parent 0d19992 commit 7527287
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blueprints/codes/eurocode/exposure_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __eq__(self, other: object) -> bool:
Boolean
True if both arguments are of the same severity (In this case they will both be literally the same).
"""
if not isinstance(other, Exposure):
if not isinstance(other, self.__class__):
raise TypeError("Only the same exposure class types can be compared with each other!")
_self_severity = int(self.value[-1]) if self.value != "Not applicable" else 0
_other_severity = int(other.value[-1]) if other.value != "Not applicable" else 0
Expand Down

0 comments on commit 7527287

Please sign in to comment.