Skip to content

fix(typing): Added __all__ to package root#190

Merged
offbyone merged 2 commits intohamcrest:mainfrom
last-partizan:main
Dec 12, 2021
Merged

fix(typing): Added __all__ to package root#190
offbyone merged 2 commits intohamcrest:mainfrom
last-partizan:main

Conversation

@last-partizan
Copy link
Contributor

This PR adds missing __all__ in package root, core and library.

After adding this, pyright correctly recognizes all imports.

I tried to minimize names duplication, and used __all__.extend syntax where possible. (This is valid option, as explained here https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#library-interface).

But it doesn't seem to work recursively, so we can use it only once per import hierarchy.

Closes #175

@yangli8866

This comment was marked as off-topic.

@hamcrest hamcrest temporarily blocked yangli8866 Dec 11, 2021
@offbyone offbyone merged commit 8615744 into hamcrest:main Dec 12, 2021
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.

Missing imports in VS Code

3 participants