mirror of https://github.com/eyhc1/rendercv.git
tests: update conftest.py
This commit is contained in:
parent
fa75788fb4
commit
e80fdd60c8
|
@ -198,14 +198,14 @@ def return_a_value_for_a_field_type(
|
||||||
bool: True,
|
bool: True,
|
||||||
}
|
}
|
||||||
|
|
||||||
if type(None) in typing.get_args(field_type):
|
if field in field_dictionary:
|
||||||
|
return field_dictionary[field]
|
||||||
|
elif type(None) in typing.get_args(field_type):
|
||||||
return return_a_value_for_a_field_type(field, field_type.__args__[0])
|
return return_a_value_for_a_field_type(field, field_type.__args__[0])
|
||||||
elif typing.get_origin(field_type) == typing.Literal:
|
elif typing.get_origin(field_type) == typing.Literal:
|
||||||
return field_type.__args__[0]
|
return field_type.__args__[0]
|
||||||
elif typing.get_origin(field_type) == typing.Union:
|
elif typing.get_origin(field_type) == typing.Union:
|
||||||
return return_a_value_for_a_field_type(field, field_type.__args__[0])
|
return return_a_value_for_a_field_type(field, field_type.__args__[0])
|
||||||
elif field in field_dictionary:
|
|
||||||
return field_dictionary[field]
|
|
||||||
elif field_type in field_type_dictionary:
|
elif field_type in field_type_dictionary:
|
||||||
return field_type_dictionary[field_type]
|
return field_type_dictionary[field_type]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue