File tree Expand file tree Collapse file tree 3 files changed +359
-352
lines changed
pydantic_settings/sources Expand file tree Collapse file tree 3 files changed +359
-352
lines changed Original file line number Diff line number Diff line change @@ -426,7 +426,11 @@ class Settings(BaseSettings):
426426 values [name ] = value
427427 continue
428428
429- if _lenient_issubclass (sub_model_field .annotation , BaseModel ) and isinstance (value , dict ):
429+ if (
430+ sub_model_field is not None
431+ and _lenient_issubclass (sub_model_field .annotation , BaseModel )
432+ and isinstance (value , dict )
433+ ):
430434 values [field_key ] = self ._replace_field_names_case_insensitively (sub_model_field , value )
431435 else :
432436 values [field_key ] = value
Original file line number Diff line number Diff line change @@ -599,7 +599,7 @@ def parse_args_insensitive_method(
599599 if matched :
600600 arg = matched .group (1 ).lower () + matched .group (2 )
601601 insensitive_args .append (arg )
602- return parser_method (root_parser , insensitive_args , namespace ) # type: ignore
602+ return parser_method (root_parser , insensitive_args , namespace )
603603
604604 return parse_args_insensitive_method
605605
You can’t perform that action at this time.
0 commit comments