Skip to content

Add __all__ to __init__.py#8

Open
avrittrohwer wants to merge 1 commit into
TerraformInDepth:mainfrom
avrittrohwer:patch-1
Open

Add __all__ to __init__.py#8
avrittrohwer wants to merge 1 commit into
TerraformInDepth:mainfrom
avrittrohwer:patch-1

Conversation

@avrittrohwer
Copy link
Copy Markdown

Without this, pyright reports errors like "Tofu" is not exported from module "tofupy"'.

Looking at microsoft/pyright#3409 (comment) and https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#library-interface, this can be fixed by adding the __all__ symbol that "provides a list of names that are considered part of the interface".

After adding this change to the init.py file in my .venv site-packages, pyright no-longer reports the error.

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.

1 participant