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

Type hints are not readily available through Pylance in VS Code #421

Open
RA80533 opened this issue Apr 27, 2023 · 1 comment · May be fixed by #422
Open

Type hints are not readily available through Pylance in VS Code #421

RA80533 opened this issue Apr 27, 2023 · 1 comment · May be fixed by #422

Comments

@RA80533
Copy link
Contributor

RA80533 commented Apr 27, 2023

Alternate title: "aioodbc does not support PEP 561"

PEP 561 – Distributing and Packaging Type Information defines the mechanisms for distributing packages with type hints:

Package maintainers who wish to support type checking of their code MUST add a marker file named py.typed to their package supporting typing. This marker applies recursively: if a top-level package includes it, all its sub-packages MUST support type checking as well.

Since aioodbc does not contain a py.typed marker file, developers may find themselves without any type hints for the package. Developers are unable to take advantage of the type annotations already part of the project.

Most typed packages on PyPI publish place their py.typed file in the namespace directory (e.g., "<root>/aioodbc") to better centralize the type checking to the package source code. It would be a huge improvement to the developer experience if the aioodbc project included a py.typed marker file alongside the package.

@RA80533 RA80533 linked a pull request Apr 27, 2023 that will close this issue
4 tasks
@jettify
Copy link
Member

jettify commented May 3, 2023

Yeah, py.typed missing because not everything typed, I was slowly moving that direction. Happy to accept any PRs.

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 a pull request may close this issue.

2 participants