We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b03f9d commit d5aa216Copy full SHA for d5aa216
src/labthings_fastapi/utilities/introspection.py
@@ -95,7 +95,9 @@ def input_model_from_signature(
95
p_type = Any if p.annotation is Parameter.empty else type_hints[name]
96
# pydantic uses `...` to represent missing defaults (i.e. required params)
97
default = Field(...) if p.default is Parameter.empty else p.default
98
- fields[name] = (p_type, default)
+ # p_type below has a complicated type, but it is reasonable to
99
+ # call p_type a `type` and ignore the mypy error.
100
+ fields[name] = (p_type, default) # type: ignore[assignment]
101
model = create_model( # type: ignore[call-overload]
102
f"{func.__name__}_input",
103
model_config=ConfigDict(extra="allow" if takes_v_kwargs else "forbid"),
0 commit comments