fix some circular imports

This commit is contained in:
Maximilian Keßler 2022-02-05 19:36:42 +01:00
parent b7bf52a24b
commit 15dd058f73
9 changed files with 9 additions and 10 deletions

View file

@ -1,2 +1 @@
from .formatting_config import BasicFormattingConfig
from .global_config import GlobalPyTeXConfig

View file

@ -1,8 +1,8 @@
from pathlib import Path, PurePath
from typing import Optional
from .formatting_config import BasicFormattingConfig
from PyTeX.format.formatting_config import FormattingConfig
from PyTeX.build.paths import PyTeXRootDirType
from ..enums import PyTeXRootDirType
class GlobalPyTeXConfig:
@ -12,7 +12,7 @@ class GlobalPyTeXConfig:
_tex_root: Optional[Path] = None
_wrapper_dir: Optional[PurePath] = None
_default_formatting_config: Optional[BasicFormattingConfig] = None
_default_formatting_config: Optional[FormattingConfig] = None
_recursive: bool = True
_overwrite_existing_files: bool = False

View file

@ -0,0 +1 @@
from .enums import *

View file

@ -1,2 +1 @@
from .enums import PyTeXRootDirType
from .relative_path import RelativePath

View file

@ -1,6 +1,6 @@
from pathlib import Path, PurePath, PurePosixPath, PureWindowsPath
from PyTeX.build.config.global_config import GlobalPyTeXConfig
from .enums import PyTeXRootDirType
from PyTeX.build.enums.enums import PyTeXRootDirType
import os

View file

@ -1,8 +1,8 @@
import os
from pathlib import Path, WindowsPath, PosixPath
from PyTeX.build.config import GlobalPyTeXConfig
from PyTeX.build.paths import PyTeXRootDirType
from ..config import GlobalPyTeXConfig
from PyTeX.build.enums.enums import PyTeXRootDirType
class RelativePath(Path):

View file

@ -2,9 +2,9 @@ from typing import List, Optional, Union
from .enums import NamingScheme, License
class BasicFormattingConfig:
class FormattingConfig:
def __init__(self):
self._naming_scheme: Union[NamingScheme, str] = NamingScheme.clean # either some predefined scheme, or a formatting string
self._naming_scheme: Union[NamingScheme, str] = NamingScheme.clean
self._author: Optional[str] = None
self._license: Optional[List[License]] = None