Skip to content

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

Open

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

Activity

  1. added
    type: feature
    on Nov 22, 2025
  2. added
    issue-status: wait-for-implementation
    and removed
    type: feature
    on Nov 23, 2025
  3. bearomorphism commented on Nov 27, 2025

    @bearomorphism
    CollaboratorAuthor

    This can be assigned to me, but probably I won't implement until other PRs are merged. There may be some dependencies.

  4. added theissue type on Nov 30, 2025
  5. bearomorphism commented on Jan 19, 2026

    @bearomorphism
    CollaboratorAuthor

    I just created a poc #1812.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

issue-status: wait-for-implementationtype: refactor

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions