Skip to content

Commit

Permalink
Fix use-before-assign spotted by pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed May 16, 2024
1 parent 99a606e commit 40442f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pymbolic/rational.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def __rsub__(self, other):
def __mul__(self, other):
if not isinstance(other, Rational):
newother = Rational(other)
else:
newother = other

try:
t = traits.common_traits(self.Numerator, newother.Numerator,
Expand Down

0 comments on commit 40442f0

Please sign in to comment.