Koda Ulaşılamıyor -> Code is unreachable
Visual Studio code is graying out my code and saying it is unreachable after I used pd.concat()
. The IDE seems to run smoothly but it’s disturbing and I want my colorful editor back.
How do I disable the editor graying out my code without changing the current language?
2
Answers
This is a bug currently existing in
pandas-stubs
.The matching overload of
concat
in pandas-stubs currently returns Never.According to this suggestion in Pylance github, you could work around the pandas-stubs issue by commenting out the Never overload in
....vscodeextensionsms-python.vscode-pylance-2024.3.1distbundledstubspandascorereshapeconcat.pyi
.This is not a bug in
pandas-stubs
. This is a bug in pylance. If type checking mode is off, it should NOT be doing the "unreachable" analysis.Here’s an example that shows the same problem, using a standard library call:
In this case, the line
print("hey")
will be shown as unreachable.