Skip to content

Modules not being publically exported (Pyright) #631

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

Closed
diblaze opened this issue Jun 10, 2022 · 2 comments
Closed

Modules not being publically exported (Pyright) #631

diblaze opened this issue Jun 10, 2022 · 2 comments
Labels
🐞bug Something isn't working
Milestone

Comments

@diblaze
Copy link

diblaze commented Jun 10, 2022

Describe the bug
Pyright will throw an error about imports not being publically exported.

To Reproduce
Steps to reproduce the behavior:

  1. Generate an client
  2. Import a module from the client
    from test_client.models import test
  3. Pyright will throw an error "test" is not exported from module "test_client.models"

Expected behavior
All public exports should be exported with a redudant alias.
from .feature import Feature should be from .feature import Feature as Feature

Additional context
Pyright will check imports in specific ways, which can be found here https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#library-interface.

Can also be fixed in the way issue #540 suggested.

@diblaze diblaze added the 🐞bug Something isn't working label Jun 10, 2022
@johnthagen
Copy link
Collaborator

johnthagen commented Aug 4, 2022

I think this is a duplicate of

But it's good to know that it's not just a mypy issue but also affects Pyright.

Edit: I see you also linked to #540. :)

@dbanty
Copy link
Collaborator

dbanty commented Sep 26, 2022

#676 fixes this 🥳

@dbanty dbanty closed this as completed Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants