add escape char attribute

This commit is contained in:
Maximilian Keßler 2022-02-06 15:36:12 +01:00
parent ed491be8ca
commit 68d908c4f2

View file

@ -30,6 +30,8 @@ class FormattingConfig(Config):
self._include_ins: Optional[bool] = True self._include_ins: Optional[bool] = True
self._use_docstrip_guards: Optional[List[str]] = None self._use_docstrip_guards: Optional[List[str]] = None
self._escape_character: Optional[str] = None
def merge_with(self, other, strict: bool = False): def merge_with(self, other, strict: bool = False):
""" """
Merges the other config into this one Merges the other config into this one
@ -182,6 +184,13 @@ class FormattingConfig(Config):
else: else:
return self._use_docstrip_guards return self._use_docstrip_guards
@property
def escape_character(self) -> str:
if self._escape_character is None:
return '!'
else:
return self._escape_character
class DocFormattingConfig: class DocFormattingConfig:
def __init__(self): def __init__(self):