python-common: fix variable name reuse to make mypy happy

The variables high and low were being used as both `str`s and regex
match objects. Rename the vars in the if block to avoid this problem.
This change makes this file pass mypy checking on mypy 0.981.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2023-03-30 16:48:02 -04:00
parent 3035ca6c52
commit f2646dbaba

View File

@ -313,10 +313,10 @@ class SizeMatcher(Matcher):
and raises if none could be found.
"""
low_high = re.match(r"\d+[A-Z]{1,2}:\d+[A-Z]{1,2}", self.value)
if low_high:
low, high = low_high.group().split(":")
self.low = self._get_k_v(low)
self.high = self._get_k_v(high)
if low_high is not None:
lowpart, highpart = low_high.group().split(":")
self.low = self._get_k_v(lowpart)
self.high = self._get_k_v(highpart)
low = re.match(r"\d+[A-Z]{1,2}:$", self.value)
if low: