reformat file
This commit is contained in:
parent
94640f9eff
commit
205dc4eeac
1 changed files with 4 additions and 0 deletions
|
@ -106,6 +106,7 @@ class SingleLineMacro(Macro, ABC):
|
|||
):
|
||||
self.chars = chars
|
||||
self.strip = strip
|
||||
|
||||
def matches(self, line: str) -> bool:
|
||||
if line.find(self.chars) != -1:
|
||||
if not line.strip(self.strip) == self.chars:
|
||||
|
@ -114,6 +115,7 @@ class SingleLineMacro(Macro, ABC):
|
|||
else:
|
||||
return False
|
||||
|
||||
|
||||
class ConfigBeginMacro(SingleLineMacro):
|
||||
def __init__(self):
|
||||
super(ConfigBeginMacro, self).__init__(FORMATTER_PREFIX + INFILE_CONFIG_BEGIN_CONFIG)
|
||||
|
@ -124,6 +126,7 @@ class ConfigBeginMacro(SingleLineMacro):
|
|||
formatter.mode = FormatterMode.drop
|
||||
return []
|
||||
|
||||
|
||||
class ConfigEndMacro(SingleLineMacro):
|
||||
def __init__(self):
|
||||
super(ConfigEndMacro, self).__init__(FORMATTER_PREFIX + INFILE_CONFIG_END_CONFIG)
|
||||
|
@ -134,6 +137,7 @@ class ConfigEndMacro(SingleLineMacro):
|
|||
formatter.mode = FormatterMode.normal
|
||||
return []
|
||||
|
||||
|
||||
class ArgumentMacro(Macro):
|
||||
def __init__(
|
||||
self,
|
||||
|
|
Loading…
Reference in a new issue