Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sbdchd
Copy link
Contributor

@sbdchd sbdchd commented Aug 14, 2020

@sanzoghenzo correctly pointed out that a py.typed file alone wasn't
enough to get the typing working, we also need to move inflection into
a package.

I tested this by running ./.venv/bin/python setup.py sdist and installing the generated .tar.gz file into a blank project.
First attempt without the setup.py changes didn't work, but moving to a package did.

example error:

main.py:3:21: error: Argument 1 to "camelize" has incompatible type "bool"; expected
"str"
    inflection.camelize(False)
                        ^
Found 1 error in 1 file (checked 1 source file)

fixes: #49

rel: https://www.python.org/dev/peps/pep-0561/#packaging-type-information

@sanzoghenzo correctly pointed out that a `py.typed` file alone wasn't
enough to get the typing working, we also need to move inflection into
a package.

fixes: #49

rel: https://www.python.org/dev/peps/pep-0561/#packaging-type-information
Copy link
Owner

@jpvanhal jpvanhal left a comment

Choose a reason for hiding this comment

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

🚀

@jpvanhal jpvanhal merged commit 5f22a6f into jpvanhal:master Aug 22, 2020
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.

Type hints not working (due to missing py.typed file?)

2 participants