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

code is shown as disabled after pd.concat([]) call #5681

Closed
akosmaroy opened this issue Mar 24, 2024 · 3 comments
Closed

code is shown as disabled after pd.concat([]) call #5681

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

Comments

@akosmaroy
Copy link

akosmaroy commented Mar 24, 2024

Type: Bug

Create a code that contains a pd.concat([]) like the following:

import pandas as pd

def foo(df, dff):
    for i in range(10):
        df = pd.concat([df, dff])
        # this is reachable code and should not be disabled
        # or shown in grey
        df['foo'] = 'foo'
        # but it is shown in grey, the line below too
        df['bar'] = 'bar'

    return df

foo()

if Pylance is enabled, the rows after pd.concat([]) are shown as disabled (grayed out). If Pylance is disabled, they are shown with proper highlight.

Extension version: 2024.3.1
VS Code version: Code 1.87.2 (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:20:17.278Z)
OS version: Windows_NT x64 10.0.22631
Modes:
Connection to 'wsl+ubuntu' could not be established

System Info
Item Value
CPUs AMD Ryzen 9 5950X 16-Core Processor (32 x 3394)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 63.91GB (35.94GB free)
Process Argv --crash-reporter-id 0b37d44c-c01e-46d2-8e4f-655177a1dd2c
Screen Reader no
VM 0%

Connection to 'wsl+ubuntu' could not be established

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:30998029
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfcontrol:30979541
d34g3935:30971562
fegfb526:30981948
bg6jg535:30979843
ccp2r3:30993541
dsvsc020:30976470
pythonaic:30996667
dsvsc021:30996838

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Mar 24, 2024
@akosmaroy
Copy link
Author

image

@debonte
Copy link
Contributor

debonte commented Mar 24, 2024

This is a duplicate of #5630. The underlying issue was in pandas-stubs. They have fixed it and their fix shipped in our 2024.3.101 prerelease build.

Our wiki has instructions on how to switch to prerelease if you need them: https://github.com/microsoft/pylance-release/wiki/FAQ#how-to-switch-pylance-builds

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

debonte commented Mar 25, 2024

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

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