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

Add py.typed to pyproject.toml. #137

Merged
merged 1 commit into from
Feb 14, 2025
Merged

Add py.typed to pyproject.toml. #137

merged 1 commit into from
Feb 14, 2025

Conversation

favyen2
Copy link
Collaborator

@favyen2 favyen2 commented Feb 14, 2025

Resolves #133.

@favyen2 favyen2 requested a review from APatrickJ February 14, 2025 19:52
@favyen2
Copy link
Collaborator Author

favyen2 commented Feb 14, 2025

@APatrickJ can you check if you have time? I'm not sure if I did it correctly but this seems to work:

$ python -c "import rslearn, pathlib; print((pathlib.Path(rslearn.__file__).parent / 'py.typed').exists())"
True

Copy link
Collaborator

@APatrickJ APatrickJ left a comment

Choose a reason for hiding this comment

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

Works for me!

In my code, I temporarily changed my dependency to:

rslearn @ git+https://github.com/allenai/rslearn.git@favyen/pytyped

And then re-installed the rslearn package.

After that, I removed all of the # type: ignore directives from the rslearn imports.

No complaints from mypy anymore :-)

Thank you!

@favyen2 favyen2 merged commit de534b4 into master Feb 14, 2025
4 checks passed
@favyen2 favyen2 deleted the favyen/pytyped branch February 14, 2025 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Indicate that rslearn supports type checking
2 participants