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

Pylance incorrectly report accessibility of some code #5675

Closed
banksempire opened this issue Mar 22, 2024 · 3 comments
Closed

Pylance incorrectly report accessibility of some code #5675

banksempire opened this issue Mar 22, 2024 · 3 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@banksempire
Copy link

Environment data

  • Language Server version: v2024.3.1
  • OS and version: MacOS 14.4
  • Python version (& distribution if applicable, e.g. Anaconda): Anaconda Python 3.11.8

Code Snippet

import pandas as pd

pd.concat([])

1 + 1 # pylance thinks this line of code is inaccessible

Repro Steps

  1. Copy the code into a .py file

Expected behavior

pylance should report line "1 + 1" is accessible.

Actual behavior

pylance reported line "1 + 1" is inaccessible.
image

Logs

XXX
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Mar 22, 2024
@debonte
Copy link
Contributor

debonte commented Mar 22, 2024

This is a duplicate of #5630. The underlying issue was in pandas-stubs. They have fixed it and their fix will ship in our next prerelease build, likely today.

In the meantime there's a workaround described here: #5630 (comment)

@debonte debonte closed this as completed Mar 22, 2024
@debonte debonte added duplicate This issue or pull request already exists and removed needs repro Issue has not been reproduced yet labels Mar 22, 2024
@debonte
Copy link
Contributor

debonte commented Mar 25, 2024

This issue is also fixed in our most recent stable release -- 2024.3.2

@banksempire
Copy link
Author

Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants