-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
explicit exports for symbols used in flows #5174
Comments
The impact of this issue is that we cannot use pyright on our flow codebases. |
Or we downgrade to before pyright 1.1.168 |
We do not support pyright and I'm hesitant to make changes to accommodate it. If you want to do a PoC of resolving these errors with minimal changes, I'm willing to consider it. I think the easiest solution is to just use the pyright configuration to change these reports from 'error' to another level. https://github.com/microsoft/pyright/blob/main/docs/configuration.md |
Ah yes, we could disable FYI: mypy also errors for the same reason when using
|
@madkinsz according to https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#library-interface, it wouldn't consider these modules as private if they're imported like |
We use absolute path imports like that everywhere so I'd prefer not. You could add an |
Hm, are you sure you'd rather use |
The other way to signal a symbol is exported is with a redundant module alias, eg:
|
I believe |
Fixed in #5293 |
Description
Generates the following pyright errors:
pyright (and therefore vscode) considers these symbols private based on these rules.
PEP 008 states modules should explicitly declare the names in their public API using the
__all__
attribute .PEP 484 also mentions that imported modules are not considered exported unless they use the
import ... as ...
syntax or equivalent.Environment
prefect version 0.15.9
The text was updated successfully, but these errors were encountered: