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

Support PEP 561 (Distributing and Packaging Type Information) #151

Open
rchen152 opened this issue Sep 10, 2018 · 2 comments
Open

Support PEP 561 (Distributing and Packaging Type Information) #151

rchen152 opened this issue Sep 10, 2018 · 2 comments
Labels
cat: stubs and 3p type stubs and third-party types enhancement

Comments

@rchen152
Copy link
Contributor

Type information for third party libraries will start being distributed outside of typeshed per PEP 561; we should support this.

@rchen152
Copy link
Contributor Author

A specific part of this PEP that would be useful for us is in-project pyi files. They would allow, e.g., pytype users to indicate the existence of Cython modules.

rchen152 added a commit that referenced this issue Dec 22, 2018
Once importlab PRs 42-44 land, the graph that pytype gets from importlab will
include both unreadable Python files and type stubs. Thus, we can stop
special-casing unreadable files in main (since pytype will analyze them
normally and report a syntax error) and need to filter out .pyi and .pytd
files in pytype_runner.

The fact that pytype sees type stubs now will make it easier to implement
#151.

Also bumps the version number in order to do a release.

Fixes #212.

PiperOrigin-RevId: 226556520
anthrotype added a commit to googlefonts/picosvg that referenced this issue Apr 29, 2020
as per PEP 0561 a compatible type checker should look at the presence of this
magic 'py.typed' file to decide whether to use the type hints from a package
(whether inlined, like in our case, or stubs).

Unfortunately, as of now, pytype doesn't support this yet.

google/pytype#151

Mypy does. Maybe we should use mypy..
@dbarnett
Copy link

dbarnett commented Aug 5, 2020

Has any work started on PEP 561 support here?

@rchen152 rchen152 added cat: infrastructure supported platforms, dependency detection, etc. cat: stubs and 3p type stubs and third-party types and removed cat: infrastructure supported platforms, dependency detection, etc. labels Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat: stubs and 3p type stubs and third-party types enhancement
Projects
None yet
Development

No branches or pull requests

2 participants