[CT-2028] A general solution for setting attributes in flag objects to consistent types
- Dominant language
- Rust
- Stars
- 13.8k
- Forks
- 2.6k
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 56
Description
In the [flag consolidation work done](https://github.com/dbt-labs/dbt-core/pull/6788/files#diff-3e5c2add494f2ffa25c42dd0ea6ea0d4cc43875474b110506dff44385adb81acR46-R54) in API-ification phase 1, we introduced a method `convert_config` that converts the `warn_error_options` param as provided from a user config to the appropriate `WarnErrorOptions`.
Given that we define which type a param should be in cli.params, we can implement this casting more generally based on the click-configured type of the param instead of hardcoding it. This should apply for other params and types as well, so that they are consistently represented between `Flags` and params (e.g. Path params)
Contributor guide
Assessment
This issue has not been assessed yet.