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. #1395

Merged
merged 2 commits into from May 8, 2020
Merged

Add py.typed file. #1395

merged 2 commits into from May 8, 2020

Conversation

neighthan
Copy link
Contributor

This seems to work based on my following quick test:

# make a file to check whether mypy finds type hints
cat > test.py << EOF
import black
EOF

With the current black version I get

$ mypy test.py
test.py:1: error: Skipping analyzing 'black': found module but no type hints or library stubs
test.py:1: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 1 source file)

After running pip install git+https://github.com/neighthan/black@patch-1 I see

$ mypy test.py
Success: no issues found in 1 source file

I've also confirmed the file is installed where we'd expect:

$ ls ~/anaconda/lib/python3.7/site-packages/black
__init__.py  __pycache__/  py.typed

Fixes #1316

Copy link
Collaborator

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

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

Wow - Fast turnaround! Thanks.

@cooperlees cooperlees added the T: enhancement New feature or request label May 8, 2020
@cooperlees cooperlees merged commit 3de8524 into psf:master May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a py.typed file
2 participants