""" sections defines our various config sections """ from configparser import SectionProxy from typing import Sequence class Home: """ the [home] section maps files within the home directory """ def __init__(self, files: Sequence[str]): self.files = files @classmethod def from_section(cls, name, section: SectionProxy): if raw_files := section.get("files"): files = list(filter(None, raw_files.splitlines())) else: files = [] return cls(files) def run(self): pass