pytex/PyTeX/config/global_config.py

36 lines
852 B
Python
Raw Normal View History

2022-02-04 11:39:15 +01:00
from pathlib import Path
from typing import Optional
2022-02-04 11:46:06 +01:00
from .formatting_config import BasicFormattingConfig
2022-02-04 11:39:15 +01:00
class GlobalPyTeXConfig:
_source_root: Optional[Path] = None
_build_root: Optional[Path] = None
_doc_root: Optional[Path] = None
_tex_root: Optional[Path] = None
2022-02-04 11:43:48 +01:00
_wrapper_dir: Optional[Path] = None
2022-02-04 11:39:15 +01:00
2022-02-04 11:46:06 +01:00
_default_formatting_config: Optional[BasicFormattingConfig] = None
2022-02-04 11:39:15 +01:00
_recursive: bool = True
_overwrite_existing_files: bool = False
_clean_old_files: True
_allow_dirty: bool = False
@classmethod
def build_root(cls) -> Path:
return cls._build_root
@classmethod
def doc_root(cls) -> Path:
return cls._doc_root
@classmethod
def source_root(cls) -> Path:
return cls._source_root
@classmethod
def tex_root(cls) -> Path:
return cls._tex_root