MCPcopy
hub / github.com/nonebot/nonebot2 / _field_is_complex

Method _field_is_complex

nonebot/config.py:98–105  ·  view source on GitHub ↗
(self, field: ModelField)

Source from the content-addressed store, hash-verified

96 return var_name if self.case_sensitive else var_name.lower()
97
98 def _field_is_complex(self, field: ModelField) -> tuple[bool, bool]:
99 if type_is_complex(field.annotation):
100 return True, False
101 elif origin_is_union(get_origin(field.annotation)) and any(
102 type_is_complex(arg) for arg in get_args(field.annotation)
103 ):
104 return True, True
105 return False, False
106
107 def _parse_env_vars(
108 self, env_vars: Mapping[str, str | None]

Callers 2

_explode_env_varsMethod · 0.95
__call__Method · 0.95

Calls 2

type_is_complexFunction · 0.90
origin_is_unionFunction · 0.90

Tested by

no test coverage detected