textual
textual copied to clipboard
Config
Reading config files and merging them.
- Things are kept in dictionary form for now as that's how they get merged.
- We could throw the data into an immutable Pydantic object to ensure validity, but I haven't implemented any validation stuff.
- Focus here is on reading config files and merging them correctly, essentially pulling all the data together into a single structure which contains the correct merged/prioritised data.
- Supports multiple config files on a users system. Whether this will be required, I don't know yet.
- It's the responsibility of the user of this class to pass in the paths to the configuration files. Textual may user appdirs for example to get locations for user config and pass them into this class.
- Environment variable ignored for now.
- There's some missing docstrings etc but will add them later.
- App config will be prefixed with
app., not done that yet though.