
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?
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 ...\.vscode\extensions\ms-python.vscode-pylance-2024.3.1\dist\bundled\stubs\pandas\core\reshape\concat.pyi.
@overload
def concat(
objs: Iterable[None] | Mapping[HashableT1, None],
*,
axis: Axis = ...,
join: Literal["inner", "outer"] = ...,
ignore_index: bool = ...,
keys: Iterable[HashableT2] = ...,
levels: Sequence[list[HashableT3] | tuple[HashableT3, ...]] = ...,
names: list[HashableT4] = ...,
verify_integrity: bool = ...,
sort: bool = ...,
copy: bool = ...,
) -> Never: ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With