From 40442f02f4292b6bbc1ac32df2bbc5c15d7d7b57 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 16 May 2024 09:42:03 -0500 Subject: [PATCH] Fix use-before-assign spotted by pylint --- pymbolic/rational.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pymbolic/rational.py b/pymbolic/rational.py index b150a54b..8ee426eb 100644 --- a/pymbolic/rational.py +++ b/pymbolic/rational.py @@ -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,