wip refactoring

This commit is contained in:
Manuel Barkhau 2020-09-07 21:43:55 +00:00
parent 31f9d51bf3
commit e053af589e
11 changed files with 39 additions and 34 deletions

View file

@ -176,6 +176,8 @@ FULL_PART_FORMATS = {
def _replace_pattern_parts(pattern: str) -> str:
# The pattern is escaped, so that everything besides the format
# string variables is treated literally.
for part_name, part_pattern in PART_PATTERNS.items():
named_part_pattern = f"(?P<{part_name}>{part_pattern})"
placeholder = "\u005c{" + part_name + "\u005c}"