Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mypy ignoring cloudpickle as it's untyped #128

Merged
merged 1 commit into from
Nov 27, 2024
Merged

Conversation

jamesbraza
Copy link
Collaborator

@jamesbraza jamesbraza commented Nov 27, 2024

This fixes an error we see when locally running mypy -p aviary:

src/aviary/tools/server.py:35:1: error: Skipping analyzing "cloudpickle": module is installed, but missing library stubs or py.typed marker  [import-untyped]
            import cloudpickle as pickle
    ^
src/aviary/tools/server.py:35:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

@jamesbraza jamesbraza added the bug Something isn't working label Nov 27, 2024
@jamesbraza jamesbraza self-assigned this Nov 27, 2024
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Nov 27, 2024
Copy link
Collaborator

@maykcaldas maykcaldas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using uv run pre-commit passes normally on my end.

@jamesbraza
Copy link
Collaborator Author

Yeah it's because pre-commit's mypy doesn't have cloudpickle in its additional_dependencies. If you locally used mypy in a virtual env with the full dev dependencies, you'd hit this error (and a bunch of others)

@jamesbraza jamesbraza merged commit b396220 into main Nov 27, 2024
5 checks passed
@jamesbraza jamesbraza deleted the typing-cloudpickle branch November 27, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants