20 lines
378 B
Python
20 lines
378 B
Python
from dataclasses import dataclass
|
|
from pathlib import Path
|
|
from typing import final
|
|
|
|
|
|
@final
|
|
@dataclass(frozen=True, slots=True)
|
|
class SrcPaths:
|
|
cfg_dir: Path
|
|
cfg_file: Path
|
|
env_file: Path
|
|
|
|
|
|
def src_paths_factory(src: Path) -> SrcPaths:
|
|
return SrcPaths(
|
|
cfg_dir=src,
|
|
cfg_file=src.joinpath("cfg.yml"),
|
|
env_file=src.joinpath(".env"),
|
|
)
|