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

Pyright thinks symbols are not exported #9

Open
holocronweaver opened this issue Nov 9, 2023 · 1 comment · May be fixed by #8
Open

Pyright thinks symbols are not exported #9

holocronweaver opened this issue Nov 9, 2023 · 1 comment · May be fixed by #8

Comments

@holocronweaver
Copy link

holocronweaver commented Nov 9, 2023

First off, thanks for this package, it really cuts down on the boto3 error handling boilerplate and makes it more like a proper Python package!

Problem

Pyright complains symbols like errors are not publicly exported, which breaks auto-completion and other IDE features.

So direct imports work: from aws_error_utils.aws_error_utils import errors
But not lib-level imports: from aws_error_utils import errors

After a bit of research, it seems Python type checkers expect py.typed libraries to re-export symbols to make them public based on guidance from PEP 484.

Proposal

I opened PR #8 to solve this issue by redundantly re-exporting symbols. Not the most elegant solution, but it seems to be what Python type checkers expect.

@holocronweaver holocronweaver linked a pull request Nov 9, 2023 that will close this issue
@benkehoe
Copy link
Owner

I'm nearing the end of my time off, and I plan on fully re-engaging with all of my projects, but realistically it means nothing is going to be addressed until early next year.

@holocronweaver holocronweaver changed the title Pyrite thinks symbols are not exported Pyright thinks symbols are not exported Nov 11, 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

Successfully merging a pull request may close this issue.

2 participants