Skip to content

change: Improve code related to configuration options #719

@pawamoy

Description

@pawamoy

Is your change request related to a problem? Please describe.

We're currently using dicts. This is... not the best. Too easy to mutate values, causing issues. Non-existent validation, value coercion, error handling or reporting. I'm particularly interested in providing better foundations for handlers.

Describe the solution you'd like

We should at least use something like dataclasses. They could be switched to Pydantic's dataclasses with an environment variable when we want to generate JSON schemas (is this possible?). We'd have to make sure extra values are supported, for backward compatibility (again, is this possible?).

Describe alternatives you've considered

Waiting for the heat death of the universe.

Additional context

I'd like to tackle this before we implement big features like #658, which will bring additional complexity.

Metadata

Metadata

Assignees

Labels

configRelated to configuration optionserror-handlingImprovements to error handlinghandlersRelated to handlersrefactorChange suggestion, not a bug nor a feature.top-priorityAbsolute priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions