You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
563 B
Python

"""
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