reformat file
This commit is contained in:
parent
b7aaa974d2
commit
fd7d49c0a6
1 changed files with 3 additions and 3 deletions
|
@ -19,6 +19,7 @@ class FormatterProperty(MacroReplacementAtomIF, Enum):
|
||||||
repo_version = 'repo_version'
|
repo_version = 'repo_version'
|
||||||
pytex_version = 'pytex_version'
|
pytex_version = 'pytex_version'
|
||||||
|
|
||||||
|
|
||||||
class Argument(MacroReplacementAtomIF, Enum):
|
class Argument(MacroReplacementAtomIF, Enum):
|
||||||
one = 1
|
one = 1
|
||||||
two = 2
|
two = 2
|
||||||
|
@ -28,7 +29,6 @@ class Argument(MacroReplacementAtomIF, Enum):
|
||||||
six = 6
|
six = 6
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class MacroReplacement(str):
|
class MacroReplacement(str):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -52,7 +52,7 @@ class MacroReplacement(str):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
elif type(arg) == Argument:
|
elif type(arg) == Argument:
|
||||||
try:
|
try:
|
||||||
new_args.append(call_args[arg.value -1])
|
new_args.append(call_args[arg.value - 1])
|
||||||
except:
|
except:
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
elif type(arg) == str:
|
elif type(arg) == str:
|
||||||
|
@ -64,7 +64,7 @@ class MacroReplacement(str):
|
||||||
if type(self.kwargs[kw]) == FormatterProperty:
|
if type(self.kwargs[kw]) == FormatterProperty:
|
||||||
new_kwargs[kw] = getattr(formatter, self.kwargs[kw].value)
|
new_kwargs[kw] = getattr(formatter, self.kwargs[kw].value)
|
||||||
elif type(self.kwargs[kw]) == Argument:
|
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:
|
elif type(self.kwargs[kw]) == str:
|
||||||
new_kwargs[kw] = self.kwargs[kw]
|
new_kwargs[kw] = self.kwargs[kw]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue