Skip to content

Commit

Permalink
🐛 Remove invaild isinstance
Browse files Browse the repository at this point in the history
  • Loading branch information
EarlMilktea committed Oct 19, 2024
1 parent 7c7ff86 commit 04861fb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions graphix/fundamentals.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ def __mul__(self, other: ComplexUnit | SupportsComplexCtor) -> ComplexUnit:

def __rmul__(self, other: SupportsComplexCtor) -> ComplexUnit:
"""Multiply the complex unit with a number."""
if isinstance(other, SupportsComplexCtor):
return self.__mul__(other)
return NotImplemented
return self.__mul__(other)

def __neg__(self) -> ComplexUnit:
"""Return the opposite of the complex unit."""
Expand Down

0 comments on commit 04861fb

Please sign in to comment.