reformat file

This commit is contained in:
Maximilian Keßler 2022-02-06 19:40:41 +01:00
parent b7aaa974d2
commit fd7d49c0a6

View file

@ -19,6 +19,7 @@ class FormatterProperty(MacroReplacementAtomIF, Enum):
repo_version = 'repo_version'
pytex_version = 'pytex_version'
class Argument(MacroReplacementAtomIF, Enum):
one = 1
two = 2
@ -28,7 +29,6 @@ class Argument(MacroReplacementAtomIF, Enum):
six = 6
class MacroReplacement(str):
def __init__(
self,
@ -52,7 +52,7 @@ class MacroReplacement(str):
raise NotImplementedError
elif type(arg) == Argument:
try:
new_args.append(call_args[arg.value -1])
new_args.append(call_args[arg.value - 1])
except:
raise NotImplementedError
elif type(arg) == str:
@ -64,7 +64,7 @@ class MacroReplacement(str):
if type(self.kwargs[kw]) == FormatterProperty:
new_kwargs[kw] = getattr(formatter, self.kwargs[kw].value)
elif type(self.kwargs[kw]) == Argument:
new_kwargs[kw] = call_args[self.kwargs[kw].value -1]
new_kwargs[kw] = call_args[self.kwargs[kw].value - 1]
elif type(self.kwargs[kw]) == str:
new_kwargs[kw] = self.kwargs[kw]
else: