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

PEP 561: Types #196

Closed
robbieculkin opened this issue Dec 5, 2022 · 3 comments
Closed

PEP 561: Types #196

robbieculkin opened this issue Dec 5, 2022 · 3 comments

Comments

@robbieculkin
Copy link

Many applications use mypy (or similar) for static typechecking. Anyone using a typechecker needs to explicitly ignore checking on pusher imports, since types don't appear to be defined according to the PEP 561 spec.

Is there anything on the roadmap to add PEP 561 compliance to the package?

@benjamin-tang-pusher
Copy link
Contributor

Hi, I ran mypy against pusher.py and couldn't couldn't detect the issue. How are you invoking the command?

(venv) benjamintang@Benjamins-MacBook-Pro pusher-http-python % mypy pusher/pusher.py 
Success: no issues found in 1 source file

@robbieculkin
Copy link
Author

robbieculkin commented Dec 14, 2022

While mypy may succeed when running on files in this repo directly, the pusher repo needs to provide either

  1. a py.typed marker file and inline type-annotated function signatures
  2. a stub package with type definitions

in order to comply with the PEP 561 spec, and for mypy type checking to work for any codebase importing from pusher.

@benjamin-tang-pusher
Copy link
Contributor

I will add this to our feature requests for our engineering to prioritise.

@benjamin-tang-pusher benjamin-tang-pusher closed this as not planned Won't fix, can't repro, duplicate, stale Jan 5, 2023
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

No branches or pull requests

2 participants