From 52ae8d4d46e2758d115c460d4ba1f0ddb1b83107 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,