Config: Allow existing values to get included in generated file

Allows for generation from an existing config file. Primarily used
for migration purposes.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2024-09-16 12:19:58 -04:00
parent 7f03003437
commit 81ae461eb8
3 changed files with 20 additions and 8 deletions

View File

@@ -62,8 +62,11 @@ def is_list_type(type_hint) -> bool:
return False
def unwrap_optional(type_hint) -> Type:
"""unwrap Optional[type] annotations"""
def unwrap_optional_type(type_hint) -> Type:
"""
Unwrap Optional[type] annotations.
This is not the same as unwrap.
"""
if get_origin(type_hint) is Union:
args = get_args(type_hint)