Skip to content

Use ChainMap to rewrite the cmd options <- configuration file <- default configuration chain #1672

@bearomorphism

Description

@bearomorphism

Description

As title. A ChainMap keeps more information and is easier to debug.

At some point, we will need a better configuration system to fix issues like #996 mentioned.

Before executing a command, we need to merge the config from configuration file and the default configuration in defaults.py. In some scenarios, CLI arguments also have to be taken into account.

Right now, if I make a plugin, I can create custom settings, but they are not typed. Would this allow plugin to declare their own settings?
example

Possible Solution

No response

Additional context

https://realpython.com/python-chainmap/#prioritizing-command-line-apps-settings

Related issues

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions