-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Import difficulty with apache_beam #1734
Comments
Do you have the I installed the latest version of apache_beam, and it is not a typed library (i.e. contains no type annotations, nor does it include a "py.typed" file indicating that it's typed). |
I do have useLibraryCodeForTypes enabled. apache_beam does have some type annotations and mentions it here. The py.typed is missing though so not sure if that's a mistake or if they're intentionally not having it for some reason (maybe still in progress). I'll check beam repo and raise an issue about it if needed. |
Sounds good! Here's some guidance we've published for library authors who are looking to add type information to their packages. |
I was curious why pyright was having trouble resolving the @jakebailey, this is one of the cases that I think you raised previously. Here's a PR for you to review: #1735 |
Isn't this the same as |
It's the same-ish, but there's an interplay when it comes to code flow and symbol tables here. It's not unlike the edge cases I described here: microsoft/pylance-release#1050 (comment) Opening a few test apps (with some extra logging), I can only see this code getting hit in |
This is addressed in pyright 1.1.129, which I just published. It will also be included in the next release of pylance. |
Describe the bug
gives an error saying Sample is not found. beam.combiners file is apache_beam/transforms/combiners.py and Sample looks defined in a normal manner.
To Reproduce
Clone this repository and follow readme. You can also just pip install latest apache beam. The repo just has a dockerfile in case the issue is environment related.
Expected behavior
No error
VS Code extension or command-line
Pyright 1.128 both directly locally on my mac and in that dockerfile that's debian based.
The text was updated successfully, but these errors were encountered: