mirror of
https://github.com/meta-llama/llama-stack.git
synced 2026-01-02 14:24:30 +00:00
chore: add some explanations and explicit check callouts to mypy ignores
Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This commit is contained in:
parent
6df600f014
commit
d443607d65
4 changed files with 18 additions and 12 deletions
|
|
@ -627,7 +627,8 @@ class NamedTupleDeserializer(ClassDeserializer[NamedTuple]):
|
|||
super().assign(property_parsers)
|
||||
|
||||
def create(self, **field_values: Any) -> NamedTuple:
|
||||
return self.class_type(**field_values) # type: ignore
|
||||
# mypy fails to deduce that this class returns NamedTuples only, hence the `ignore` directive
|
||||
return self.class_type(**field_values) # type: ignore[no-any-return]
|
||||
|
||||
|
||||
class DataclassDeserializer(ClassDeserializer[T]):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue