strawberry
strawberry copied to clipboard
Mypy complains wrongly about to_pydantic when using a pydantic type that was converted with all_fields=True
Describe the Bug
I introduced this bug in 0.118.0
class MyModel(BaseModel):
item: str
@strawberry_from_pydantic(model=MyModel, all_fields=True
)
class StrawberryModel:
...
StrawberryModel(item).to_pydantic()
# mypy errors incorrectly
I should be able to fix it by infering that all_fields=True if there are no strawberry.auto declarations in the class
System Information
- Operating system:
- Strawberry version (if applicable):