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
"""
2 months ago
from configparser import SectionProxy
from typing import Sequence
class Home:
"""
the [home] section maps files within the home directory
"""
2 months ago
def __init__(self, files: Sequence[str]):
self.files = files
@classmethod
2 months ago
def from_section(cls, name, section: SectionProxy):
if raw_files := section.get("files"):
files = list(filter(None, raw_files.splitlines()))
else:
2 months ago
files = []
return cls(files)
def run(self):
pass