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

Added py.typed metadata file #24

Merged
merged 2 commits into from
Mar 4, 2024
Merged

Added py.typed metadata file #24

merged 2 commits into from
Mar 4, 2024

Conversation

jamesbraza
Copy link
Collaborator

Adds a missing py.typed file to satisfy mypy for client repos.

With this Python file:

# a.py

import paperscraper

Running pip install git+https://github.com/blackadad/paper-scraper mypy==1.8.0 then mypy a.py:

a.py:3: error: Skipping analyzing "paperscraper": module is installed, but missing library stubs or py.typed marker  [import-untyped]
a.py:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 1 source file)

Now running pip install git+https://github.com/jamesbraza/paper-scraper@py-typed mypy==1.8.0 then mypy a.py:

/Users/user/.pyenv/versions/3.11.8/lib/python3.11/site-packages/pypdf/_crypt_providers/_pycryptodome.py:30: error: Cannot find implementation or library stub for module named "Crypto"  [import-not-found]
/Users/user/.pyenv/versions/3.11.8/lib/python3.11/site-packages/pypdf/_crypt_providers/_pycryptodome.py:31: error: Cannot find implementation or library stub for module named "Crypto.Cipher.AES"  [import-not-found]
/Users/user/.pyenv/versions/3.11.8/lib/python3.11/site-packages/pypdf/_crypt_providers/_pycryptodome.py:31: error: Cannot find implementation or library stub for module named "Crypto.Cipher.ARC4"  [import-not-found]
...

(That means it works, just I don't have my mypy config properly dialed in)

@blackadad blackadad merged commit 9a1c4ad into blackadad:main Mar 4, 2024
@jamesbraza jamesbraza deleted the py-typed branch March 4, 2024 19:59
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.

2 participants