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

specify __all__ for type checkers #83

Merged
merged 1 commit into from Jul 11, 2022

Conversation

ajparsons
Copy link
Contributor

@ajparsons ajparsons commented Jul 11, 2022

In the following use, pyright gets unhappy (reportPrivateImportUsage) about option because it was imported from click.

from rich_click import click

@click.option

Being explicit in __all__ makes it happy
(see rules here https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#library-interface)

@ewels
Copy link
Owner

ewels commented Jul 11, 2022

Sure 👍🏻 Please just run the precommit / black to fix the whitespace and I'll merge.

In the following use, pyright gets unhappy

```
from rich_click import click

@click.option
```

Being explicit in __all__ makes it happy
(see rules here https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#library-interface)
@ajparsons
Copy link
Contributor Author

Doh - fixed.

@ewels
Copy link
Owner

ewels commented Jul 11, 2022

Thanks!

@ewels ewels merged commit ea8951f into ewels:main Jul 11, 2022
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.

None yet

2 participants