Skip to content
This repository was archived by the owner on Apr 10, 2023. It is now read-only.
This repository was archived by the owner on Apr 10, 2023. It is now read-only.

Integration with mypy #119

@radix

Description

@radix

I'm not sure if the serde field type annotations are compatible with MyPy. For example, with this code:

from serde import Model, fields
class Artist(Model):
    name: fields.Str()

Running mypy on the code gives the following result (in addition to an error about the fact that serde doesn't have a type definition module):

serdetest.py:7: error: Invalid type comment or annotation
serdetest.py:7: note: Suggestion: use fields.Str[...] instead of fields.Str(...)

So, on the surface, it seems that this library is incompatible with MyPy. Is this true, or is there a way to get them to work together?

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions