tools/osbuild-mpp: small whitespace fixes

Since David is on leave, I have to do them. Also Move the pylint
comment above the line, not next to it.
This commit is contained in:
Christian Kellner 2021-07-01 13:20:07 +00:00
parent 5ac1e004a6
commit ff76b6fade

View file

@ -417,6 +417,7 @@ class ManifestFile:
if not isinstance(node, dict):
return False
return "mpp-format-string" in node or "mpp-format-int" in node
def _eval_format(node, local_vars):
if "mpp-format-string" in node:
is_int = False
@ -424,7 +425,9 @@ class ManifestFile:
else:
is_int = True
format_string = node["mpp-format-int"]
res = eval(f'f\'\'\'{format_string}\'\'\'', local_vars) # pylint: disable=eval-used # yolo this is fine!
# pylint: disable=eval-used # yolo this is fine!
res = eval(f'f\'\'\'{format_string}\'\'\'', local_vars)
if is_int:
return int(res)
@ -447,6 +450,7 @@ class ManifestFile:
def process_format(self):
self._process_format(self.root)
class ManifestFileV1(ManifestFile):
def __init__(self, path, data):
super().__init__(path, data, 1)
@ -511,7 +515,7 @@ class ManifestFileV1(ManifestFile):
packages += checksums
def process_depsolves(self, solver, pipeline=None, depth = 0):
def process_depsolves(self, solver, pipeline=None, depth=0):
if pipeline is None:
pipeline = self.pipeline