strawberry-graphql / strawberry-django

Strawberry GraphQL Django extension
https://strawberry.rocks/docs/django
MIT License
415 stars 120 forks source link

Missing py.typed marker #485

Closed pm-incyan closed 8 months ago

pm-incyan commented 8 months ago

I'm working on a project which includes mypy and when hitting strawberry_django it says it cannot find the type hints.

The error from mypy is error: Skipping analyzing "strawberry_django": module is installed, but missing library stubs or py.typed marker [import-untyped]

The code in this repo looks like it has been annotated but there isn't a py.typed file in the package directory. Is it missing?

I tested locally by manually adding a py.typed file, and mypy passed happily.

Upvote & Fund

Fund with Polar

patrick91 commented 8 months ago

@pm-incyan oh, yeah, we're totally missing it! can you send a PR?

I've done something similar for Strawberry here: https://github.com/strawberry-graphql/strawberry/commit/00ff8fdec9accc43bccff47fae45a3c5bf7b5803

pm-incyan commented 8 months ago

Done and verified the marker makes it into the built package without further changes.