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

backport the typeshed contextlib.pyi file and add a py.typed #33

Closed
graingert opened this issue Jun 26, 2021 · 4 comments
Closed

backport the typeshed contextlib.pyi file and add a py.typed #33

graingert opened this issue Jun 26, 2021 · 4 comments

Comments

@graingert
Copy link
Member

No description provided.

@ncoghlan
Copy link
Collaborator

Reviewing https://www.python.org/dev/peps/pep-0561/:

  • convert distribution structure from contextlib2.py to contextlib2/__init__.py
  • add contextlib2/py.typed
  • copy the typeshed contextlib.pyi file in as contextlib2/__init__.pyi

@graingert
Copy link
Member Author

You could alternatively maintain a types-contextlib2 package with the pyi file in

@ncoghlan
Copy link
Collaborator

True, but the pyi file isn't that big, and having to keep a second package in sync would be annoying.

ncoghlan added a commit to ncoghlan/contextlib2 that referenced this issue Jun 26, 2021
ncoghlan added a commit that referenced this issue Jun 26, 2021
Issue #33: convert to package and include typeshed type hints
@ncoghlan
Copy link
Collaborator

It turned out the other concrete benefit to shipping a natively typed package was being able to integrate a self-consistency check into the module CI: #37

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