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

Add typing metadata and include py.typed in sdist #1782

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Eitol
Copy link
Contributor

@Eitol Eitol commented Jan 30, 2025

I submitted this pull request to enhance the opcua-asyncio library's compatibility with static type checkers like mypy. While running mypy in my project, I encountered the following error:

Skipping analyzing "asyncua.ua": module is installed, but missing library stubs or py.typed marker  [import-untyped]

This issue arises because mypy requires either inline type annotations or the presence of a py.typed file in the package to recognize it as typed. By adding the py.typed file and including it in the source distribution (sdist), we ensure that mypy and other type checkers can properly analyze the asyncua module, thereby improving the developer experience and code reliability.

This commit marks the package as typed in the classifiers and ensures `py.typed` is included in the source distribution. This improves compatibility with type checkers and enforces better type safety for users.
@Eitol Eitol marked this pull request as ready for review January 30, 2025 17:47
@oroulet
Copy link
Member

oroulet commented Jan 30, 2025

the main issue is that typing is far from perfect. but we can try again to fix it...

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