From 5f4d9a8cc06978d0eb55f73d72f59670092c8350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sat, 5 Feb 2022 22:40:10 +0100 Subject: [PATCH] extend formatting config --- PyTeX/format/formatting_config.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/PyTeX/format/formatting_config.py b/PyTeX/format/formatting_config.py index 512e253..2d71b0c 100644 --- a/PyTeX/format/formatting_config.py +++ b/PyTeX/format/formatting_config.py @@ -1,11 +1,11 @@ from typing import List, Optional, Union from .enums import NamingScheme, License +from .generic_text import GenericText class FormattingConfig: def __init__(self): self._naming_scheme: Union[NamingScheme, str] = NamingScheme.clean - self._author: Optional[str] = None self._license: Optional[List[License]] = None self._extra_header: List[str] = [] @@ -20,6 +20,22 @@ class FormattingConfig: self._include_ins: bool = True self._use_docstrip_guards: Optional[List[str]] = None + self._author: Optional[str] = None + self._licenses = Optional[List[GenericText]] + self._extra_header_file: Optional[GenericText] = None + self._pytex_version: Optional[str] = None + self._pytex_info_text: Optional[GenericText] = None + self._repo_version: Optional[str] = None + self._repo_info_text: Optional[GenericText] = None + + def merge_with(self, other): + """ + Merges the other config into this one + :param other: + :return: self + """ + return self + class DocFormattingConfig: def __init__(self):