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

False positive unreachable #3373

Closed
janosh opened this issue Sep 21, 2022 · 2 comments
Closed

False positive unreachable #3373

janosh opened this issue Sep 21, 2022 · 2 comments

Comments

@janosh
Copy link

janosh commented Sep 21, 2022

Environment data

  • Language Server version: Pylance language server 2022.9.20 (pyright 95c059fa)
  • OS and version: macOS 12.6
  • Python version (& distribution if applicable, e.g. Anaconda): 3.10

Code Snippet

import numpy as np

X = np.array([1, 2, 3])
Y = np.array([4, 5, 6])

np.cross(X, Y)
print(X)  # pylance says unreachable

Expected behavior

Code should be marked reachable.

Actual behavior

Screen Shot 2022-09-20 at 17 16 56

@erictraut
Copy link
Contributor

This is a duplicate of #3277.

@janosh
Copy link
Author

janosh commented Sep 21, 2022

Ah, good to know someone already raised an issue with numpy/numpy#22146.

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

No branches or pull requests

2 participants