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 PEP484 type hints #44

Closed
wwuck opened this issue May 25, 2020 · 5 comments · Fixed by #45
Closed

Add PEP484 type hints #44

wwuck opened this issue May 25, 2020 · 5 comments · Fixed by #45

Comments

@wwuck
Copy link
Contributor

wwuck commented May 25, 2020

Proposal to add PEP484 type hints and related PEP561 packaging information to inflection. Since the lowest support python3 here appears to be 3.5, we can just use typing library directly without using type hint comments.

@wwuck wwuck mentioned this issue May 25, 2020
@wwuck
Copy link
Contributor Author

wwuck commented May 25, 2020

Just realised that Pypy doesn't appear to support type hints :(

https://doc.pypy.org/en/latest/faq.html#would-type-annotations-help-pypy-s-performance

Would that be a blocker for this issue?

@jpvanhal
Copy link
Owner

Hi, thanks for the proposal and the PR! I've been thinking about adding type hints myself as well :)

Just realised that Pypy doesn't appear to support type hints :(

doc.pypy.org/en/latest/faq.html#would-type-annotations-help-pypy-s-performance

Would that be a blocker for this issue?

I was checking the Travis logs for your PR and it looks like the Pypy build is failing to install typed-ast package. See also python/typed_ast#111.

typed-ast is a dependency of mypy. If installation of mypy and thus the static type checking was skipped on Pypy build, I'd assume that would make the whole build green. So I don't see this as a blocker.

@wwuck
Copy link
Contributor Author

wwuck commented Jun 1, 2020

I've skipped mypy on pypy3 tox run, so it should all be fine on the PR now.

@jpvanhal
Copy link
Owner

jpvanhal commented Jun 6, 2020

Thanks, @wwuck! This is included in v0.5.0.

@henryiii
Copy link

It looks like you added type hints (fantastic), but forgot to add the py.typed file to your MANIFEST.in, so downstream projects can't use it. :'(

I'd highly recommend check-manifest to avoid this in the future. Maybe in a pre-commit check or something. docs.

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 a pull request may close this issue.

3 participants