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 file to enable typing downstream #162

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

thomasborgen
Copy link
Contributor

the py.typed file is required by mypy to consider our package typed when imported/used in other projects.

Mypy documentation

If you would like to publish a library package to a package repository yourself (e.g. on PyPI) for either internal or external use in type checking, packages that supply type information via type comments or annotations in the code should put a py.typed file in their package directory.

@thomasborgen thomasborgen added the enhancement New feature or request label Jan 15, 2024
@thomasborgen thomasborgen self-assigned this Jan 15, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6368651) 100.00% compared to head (5d2156f) 100.00%.
Report is 2 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #162   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines          485       485           
  Branches        69        69           
=========================================
  Hits           485       485           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ChameleonTartu
Copy link
Collaborator

@thomasborgen The change looks good, BUT can you add in the pipeline another step such as mypy kaiba? This will ensure that the step didn't work before, and this will be an actual fix for the issue.

@thomasborgen
Copy link
Contributor Author

@ChameleonTartu we are running mypy in tests. poetry run mypy .
Not sure how we'd go about testing this, since this is only an issue downstream. Basically, if you install kaiba to use in another library or script, we need the py.typed file for mypy to do typechecking.
Since we can't install this branch's specific kaiba version in a github action (since its not published) I don't think theres any way to test this :<

Copy link
Collaborator

@ChameleonTartu ChameleonTartu left a comment

Choose a reason for hiding this comment

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

@ChameleonTartu ChameleonTartu merged commit 83e09ab into main Jan 16, 2024
4 checks passed
@ChameleonTartu ChameleonTartu deleted the borgen/add-py.typed-file-so-typing-is-enabled branch January 16, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants