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

Wrong analysis (and different from Pyright) on call result of overloaded function #6979

Closed
Azureblade3808 opened this issue Feb 24, 2025 · 2 comments
Assignees
Labels
needs repro Issue has not been reproduced yet

Comments

@Azureblade3808
Copy link

Environment data

  • Pylance version: 2025.2.101 Pre-release
  • OS and version: Windows 10 & CentOS Stream 9
  • Python version (& distribution if applicable, e.g. Anaconda): 3.13.2 Conda-forge

Code Snippet

from typing import Literal, overload

from typing_extensions import assert_type


@overload
def func(*, inplace: Literal[True]) -> None: ...
@overload
def func(*, inplace: Literal[False] = ...) -> int: ...
@overload
def func(*, inplace: bool = ...) -> int | None: ...


def func(*, inplace: bool = ...) -> int | None: ...


_ = assert_type(func(), "int")

Expected behavior

No error is reported.

Note: this snippet type-checks with Pyright 1.1.393 & 1.1.394.

Actual behavior

Image

Logs

2025-02-18 13:46:59.032 [info] (Client) Pylance async client (2025.2.1) started with python extension (2025.1.2025021701)
2025-02-18 13:46:59.896 [info] [Info  - 1:46:59 PM] (18932) Server root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist
2025-02-18 13:46:59.896 [info] [Info  - 1:46:59 PM] (18932) Pylance language server 2025.2.1 (pyright version 1.1.393, commit 3763156f) starting
2025-02-18 13:46:59.956 [info] [Info  - 1:46:59 PM] (18932) Starting service instance "test"
2025-02-18 13:47:00.262 [info] [Info  - 1:47:00 PM] (18932) Setting environmentName for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-18 13:47:00.263 [info] [Info  - 1:47:00 PM] (18932) Setting pythonPath for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-18 13:47:00.263 [info] [Info  - 1:47:00 PM] (18932) No include entries specified; assuming c:\Users\QWLHD\Documents\workspace\python\test
2025-02-18 13:47:00.263 [info] [Info  - 1:47:00 PM] (18932) Auto-excluding **/node_modules
2025-02-18 13:47:00.263 [info] [Info  - 1:47:00 PM] (18932) Auto-excluding **/__pycache__
2025-02-18 13:47:00.264 [info] [Info  - 1:47:00 PM] (18932) Auto-excluding **/.*
2025-02-18 13:47:00.265 [info] [Warn  - 1:47:00 PM] (18932) stubPath file:///c%3A/Users/QWLHD/Documents/workspace/python/test/__stubs__ is not a valid directory.
2025-02-18 13:47:00.469 [info] [Info  - 1:47:00 PM] (18932) Assuming Python version 3.13.1.final.0
2025-02-18 13:47:00.817 [info] [Info  - 1:47:00 PM] (18932) No source files found.
2025-02-18 13:47:01.769 [info] [Info  - 1:47:01 PM] (18932) Background analysis(1) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist
2025-02-18 13:47:02.063 [info] [Info  - 1:47:02 PM] (18932) Background analysis(1) started
2025-02-18 13:47:06.832 [info] [Info  - 1:47:06 PM] (18932) Found 1 source file
2025-02-18 13:47:06.962 [info] [Info  - 1:47:06 PM] (18932) Indexer background runner(2) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist (index)
2025-02-18 13:47:06.962 [info] [Info  - 1:47:06 PM] (18932) Indexing(2) started
2025-02-18 13:47:08.652 [info] [Info  - 1:47:08 PM] (18932) scanned(2) 160 files over 1 exec env
2025-02-18 13:47:08.970 [info] [Info  - 1:47:08 PM] (18932) indexed(2) 160 files over 1 exec env
2025-02-18 13:47:09.067 [info] [Info  - 1:47:09 PM] (18932) Indexing finished(2).
2025-02-18 13:47:12.271 [info] [Info  - 1:47:12 PM] (18932) Found 2 source files
2025-02-18 13:47:31.539 [info] [Info  - 1:47:31 PM] (18932) Starting service instance "<default>"
2025-02-18 13:47:31.590 [info] [Info  - 1:47:31 PM] (18932) Setting environmentName for service "<default>": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-18 13:47:31.591 [info] [Info  - 1:47:31 PM] (18932) Setting pythonPath for service "<default>": "c:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-18 13:47:31.591 [info] [Info  - 1:47:31 PM] (18932) No include entries specified; assuming \<default workspace root>
2025-02-18 13:47:31.591 [info] [Info  - 1:47:31 PM] (18932) Auto-excluding **/node_modules
2025-02-18 13:47:31.592 [info] [Info  - 1:47:31 PM] (18932) Auto-excluding **/__pycache__
2025-02-18 13:47:31.592 [info] [Info  - 1:47:31 PM] (18932) Auto-excluding **/.*
2025-02-18 13:47:31.718 [info] [Info  - 1:47:31 PM] (18932) Assuming Python version 3.13.1.final.0
2025-02-18 13:47:31.926 [info] [Error - 1:47:31 PM] (18932) File or directory "\<default workspace root>" does not exist.
2025-02-18 13:47:31.926 [info] [Info  - 1:47:31 PM] (18932) No source files found.
2025-02-18 13:47:32.362 [info] [Info  - 1:47:32 PM] (18932) Background analysis(3) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist
2025-02-18 13:47:32.367 [info] [Info  - 1:47:32 PM] (18932) Background analysis(3) started
2025-02-18 13:49:12.450 [info] [Info  - 1:49:12 PM] (18932) Found 4 source files
2025-02-18 17:55:22.968 [info] [Info  - 5:55:22 PM] (18932) Indexer background runner(4) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist (refresh)
2025-02-18 17:55:22.968 [info] [Info  - 5:55:22 PM] (18932) Indexing(4) started
2025-02-18 17:55:24.931 [info] [Info  - 5:55:24 PM] (18932) scanned(4) 160 files over 1 exec env
2025-02-18 17:55:25.366 [info] [Info  - 5:55:25 PM] (18932) indexed(4) 160 files over 1 exec env
2025-02-18 17:55:25.472 [info] [Info  - 5:55:25 PM] (18932) Indexing finished(4).
2025-02-18 17:55:55.431 [info] [Info  - 5:55:55 PM] (18932) Indexer background runner(5) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist (refresh)
2025-02-18 17:55:55.431 [info] [Info  - 5:55:55 PM] (18932) Indexing(5) started
2025-02-18 17:55:57.202 [info] [Info  - 5:55:57 PM] (18932) scanned(5) 163 files over 1 exec env
2025-02-18 17:55:57.753 [info] [Info  - 5:55:57 PM] (18932) indexed(5) 163 files over 1 exec env
2025-02-18 17:55:57.872 [info] [Info  - 5:55:57 PM] (18932) Indexing finished(5).
2025-02-18 18:05:27.717 [info] [Info  - 6:05:27 PM] (18932) Indexer background runner(6) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist (refresh)
2025-02-18 18:05:27.717 [info] [Info  - 6:05:27 PM] (18932) Indexing(6) started
2025-02-18 18:05:30.139 [info] [Info  - 6:05:30 PM] (18932) scanned(6) 160 files over 1 exec env
2025-02-18 18:05:30.445 [info] [Info  - 6:05:30 PM] (18932) indexed(6) 160 files over 1 exec env
2025-02-18 18:05:30.544 [info] [Info  - 6:05:30 PM] (18932) Indexing finished(6).
2025-02-20 11:36:19.184 [info] [Info  - 11:36:19 AM] (18932) Indexer background runner(7) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist (refresh)
2025-02-20 11:36:19.184 [info] [Info  - 11:36:19 AM] (18932) Indexing(7) started
2025-02-20 11:36:20.006 [info] [Info  - 11:36:20 AM] (18932) scanned(7) 160 files over 1 exec env
2025-02-20 11:36:20.453 [info] [Info  - 11:36:20 AM] (18932) indexed(7) 160 files over 1 exec env
2025-02-20 11:36:20.597 [info] [Info  - 11:36:20 AM] (18932) Indexing finished(7).
2025-02-21 18:17:29.461 [info] [Info  - 6:17:29 PM] (18932) Indexer background runner(8) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist (refresh)
2025-02-21 18:17:29.462 [info] [Info  - 6:17:29 PM] (18932) Indexing(8) started
2025-02-21 18:17:31.968 [info] [Info  - 6:17:31 PM] (18932) [IDX(8)] Long operation: scan packages file:///c%3A/Users/QWLHD/Documents/workspace/python/test (2175ms)
2025-02-21 18:17:31.970 [info] [Info  - 6:17:31 PM] (18932) scanned(8) 160 files over 1 exec env
2025-02-21 18:17:32.469 [info] [Info  - 6:17:32 PM] (18932) indexed(8) 160 files over 1 exec env
2025-02-21 18:17:32.630 [info] [Info  - 6:17:32 PM] (18932) Indexing finished(8).
2025-02-21 18:19:17.013 [info] [Info  - 6:19:17 PM] (18932) Indexer background runner(9) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist (refresh)
2025-02-21 18:19:17.013 [info] [Info  - 6:19:17 PM] (18932) Indexing(9) started
2025-02-21 18:19:21.268 [info] [Info  - 6:19:21 PM] (18932) [IDX(9)] Long operation: scan packages file:///c%3A/Users/QWLHD/Documents/workspace/python/test (2363ms)
2025-02-21 18:19:21.268 [info] [Info  - 6:19:21 PM] (18932) scanned(9) 158 files over 1 exec env
2025-02-21 18:19:23.767 [info] [Info  - 6:19:23 PM] (18932) indexed(9) 158 files over 1 exec env
2025-02-21 18:19:26.064 [info] [Info  - 6:19:26 PM] (18932) Indexing finished(9).
2025-02-21 18:19:35.238 [info] [Info  - 6:19:35 PM] (18932) Indexer background runner(10) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist (refresh)
2025-02-21 18:19:35.238 [info] [Info  - 6:19:35 PM] (18932) Indexing(10) started
2025-02-21 18:19:38.225 [info] [Info  - 6:19:38 PM] (18932) [IDX(10)] Long operation: scan packages file:///c%3A/Users/QWLHD/Documents/workspace/python/test (2702ms)
2025-02-21 18:19:38.226 [info] [Info  - 6:19:38 PM] (18932) scanned(10) 160 files over 1 exec env
2025-02-21 18:19:38.545 [info] [Info  - 6:19:38 PM] (18932) indexed(10) 160 files over 1 exec env
2025-02-21 18:19:38.629 [info] [Info  - 6:19:38 PM] (18932) Indexing finished(10).
2025-02-21 18:19:46.058 [info] [Info  - 6:19:46 PM] (18932) Indexer background runner(11) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist (refresh)
2025-02-21 18:19:46.059 [info] [Info  - 6:19:46 PM] (18932) Indexing(11) started
2025-02-21 18:19:47.658 [info] [Info  - 6:19:47 PM] (18932) scanned(11) 160 files over 1 exec env
2025-02-21 18:19:48.061 [info] [Info  - 6:19:48 PM] (18932) indexed(11) 160 files over 1 exec env
2025-02-21 18:19:48.194 [info] [Info  - 6:19:48 PM] (18932) Indexing finished(11).
2025-02-24 09:58:11.350 [info] [Info  - 9:58:11 AM] (18932) Indexer background runner(12) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist (refresh)
2025-02-24 09:58:11.350 [info] [Info  - 9:58:11 AM] (18932) Indexing(12) started
2025-02-24 09:58:13.379 [info] [Info  - 9:58:13 AM] (18932) scanned(12) 160 files over 1 exec env
2025-02-24 09:58:13.784 [info] [Info  - 9:58:13 AM] (18932) Indexing finished(12).
2025-02-24 09:58:25.391 [info] [Info  - 9:58:25 AM] (18932) Indexer background runner(13) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist (refresh)
2025-02-24 09:58:25.391 [info] [Info  - 9:58:25 AM] (18932) Indexing(13) started
2025-02-24 09:58:27.718 [info] [Info  - 9:58:27 AM] (18932) [IDX(13)] Long operation: scan packages file:///c%3A/Users/QWLHD/Documents/workspace/python/test (2090ms)
2025-02-24 09:58:27.719 [info] [Info  - 9:58:27 AM] (18932) scanned(13) 160 files over 1 exec env
2025-02-24 09:58:28.226 [info] [Info  - 9:58:28 AM] (18932) indexed(13) 160 files over 1 exec env
2025-02-24 09:58:28.352 [info] [Info  - 9:58:28 AM] (18932) Indexing finished(13).
2025-02-24 10:10:14.613 [info] [Info  - 10:10:14 AM] (18932) Setting environmentName for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:10:14.648 [info] [Info  - 10:10:14 AM] (18932) Setting pythonPath for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:10:14.649 [info] [Info  - 10:10:14 AM] (18932) No include entries specified; assuming c:\Users\QWLHD\Documents\workspace\python\test
2025-02-24 10:10:14.650 [info] [Info  - 10:10:14 AM] (18932) Auto-excluding **/node_modules
2025-02-24 10:10:14.693 [info] [Info  - 10:10:14 AM] (18932) Auto-excluding **/__pycache__
2025-02-24 10:10:14.694 [info] [Info  - 10:10:14 AM] (18932) Auto-excluding **/.*
2025-02-24 10:10:14.695 [info] [Warn  - 10:10:14 AM] (18932) stubPath file:///c%3A/Users/QWLHD/Documents/workspace/python/test/__stubs__ is not a valid directory.
2025-02-24 10:10:14.933 [info] [Info  - 10:10:14 AM] (18932) Assuming Python version 3.13.2.final.0
2025-02-24 10:10:15.402 [info] [Info  - 10:10:15 AM] (18932) Found 2 source files
2025-02-24 10:10:15.541 [info] [Info  - 10:10:15 AM] (18932) Setting environmentName for service "<default>": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:10:15.542 [info] [Info  - 10:10:15 AM] (18932) Setting pythonPath for service "<default>": "c:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:10:15.543 [info] [Info  - 10:10:15 AM] (18932) No include entries specified; assuming \<default workspace root>
2025-02-24 10:10:15.543 [info] [Info  - 10:10:15 AM] (18932) Auto-excluding **/node_modules
2025-02-24 10:10:15.544 [info] [Info  - 10:10:15 AM] (18932) Auto-excluding **/__pycache__
2025-02-24 10:10:15.544 [info] [Info  - 10:10:15 AM] (18932) Auto-excluding **/.*
2025-02-24 10:10:16.161 [info] [Info  - 10:10:16 AM] (18932) Assuming Python version 3.13.2.final.0
2025-02-24 10:10:16.666 [info] [Error - 10:10:16 AM] (18932) File or directory "\<default workspace root>" does not exist.
2025-02-24 10:10:16.667 [info] [Info  - 10:10:16 AM] (18932) No source files found.
2025-02-24 10:10:17.508 [info] [Info  - 10:10:17 AM] (18932) Indexer background runner(14) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.1/dist (index)
2025-02-24 10:10:17.508 [info] [Info  - 10:10:17 AM] (18932) Indexing(14) started
2025-02-24 10:10:18.022 [info] [Info  - 10:10:18 AM] (18932) scanned(14) 160 files over 1 exec env
2025-02-24 10:10:18.361 [info] [Info  - 10:10:18 AM] (18932) indexed(14) 160 files over 1 exec env
2025-02-24 10:10:18.451 [info] [Info  - 10:10:18 AM] (18932) Indexing finished(14).
2025-02-24 10:10:20.745 [info] [Info  - 10:10:20 AM] (18932) Found 5 source files
2025-02-24 10:10:23.760 [info] [Info  - 10:10:23 AM] (18932) Found 3 source files
2025-02-24 10:20:08.762 [info] (Client) Pylance async client (2025.2.101) started with python extension (2025.1.2025022102)
2025-02-24 10:20:09.504 [info] [Info  - 10:20:09 AM] (18204) Server root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist
2025-02-24 10:20:09.505 [info] [Info  - 10:20:09 AM] (18204) Pylance language server 2025.2.101 (pyright version 1.1.394, commit 8a3ad454) starting
2025-02-24 10:20:09.506 [info] [Info  - 10:20:09 AM] (18204) Starting service instance "test"
2025-02-24 10:20:09.596 [info] [Info  - 10:20:09 AM] (18204) Setting environmentName for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:20:09.597 [info] [Info  - 10:20:09 AM] (18204) Setting pythonPath for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:20:09.597 [info] [Info  - 10:20:09 AM] (18204) No include entries specified; assuming c:\Users\QWLHD\Documents\workspace\python\test
2025-02-24 10:20:09.598 [info] [Info  - 10:20:09 AM] (18204) Auto-excluding **/node_modules
2025-02-24 10:20:09.598 [info] [Info  - 10:20:09 AM] (18204) Auto-excluding **/__pycache__
2025-02-24 10:20:09.599 [info] [Info  - 10:20:09 AM] (18204) Auto-excluding **/.*
2025-02-24 10:20:09.599 [info] [Warn  - 10:20:09 AM] (18204) stubPath file:///c%3A/Users/QWLHD/Documents/workspace/python/test/__stubs__ is not a valid directory.
2025-02-24 10:20:09.771 [info] [Info  - 10:20:09 AM] (18204) Assuming Python version 3.13.2.final.0
2025-02-24 10:20:10.315 [info] [Info  - 10:20:10 AM] (18204) Found 1 source file
2025-02-24 10:20:12.760 [info] [Info  - 10:20:12 AM] (18204) Background analysis(1) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist
2025-02-24 10:20:12.795 [info] [Info  - 10:20:12 AM] (18204) Background analysis(1) started
2025-02-24 10:20:13.087 [info] [Info  - 10:20:13 AM] (18204) Indexer background runner(2) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist (index)
2025-02-24 10:20:13.100 [info] [Info  - 10:20:13 AM] (18204) Indexing(2) started
2025-02-24 10:20:14.254 [info] [Info  - 10:20:14 AM] (18204) [IDX(2)] Long operation: scan packages file:///c%3A/Users/QWLHD/Documents/workspace/python/test (2557ms)
2025-02-24 10:20:14.262 [info] [Info  - 10:20:14 AM] (18204) scanned(2) 160 files over 1 exec env
2025-02-24 10:20:17.803 [info] [Info  - 10:20:17 AM] (18204) [IDX(2)] Long operation: index execution environment file:///c%3A/Users/QWLHD/Documents/workspace/python/test (3130ms)
2025-02-24 10:20:17.894 [info] [Info  - 10:20:17 AM] (18204) [IDX(2)] Long operation: index packages file:///c%3A/Users/QWLHD/Documents/workspace/python/test (3241ms)
2025-02-24 10:20:17.894 [info] [Info  - 10:20:17 AM] (18204) indexed(2) 160 files over 1 exec env
2025-02-24 10:20:18.014 [info] [Info  - 10:20:18 AM] (18204) Indexing finished(2).
2025-02-24 10:23:44.281 [info] (Client) Pylance async client (2025.2.101) started with python extension (2025.1.2025022102)
2025-02-24 10:23:45.451 [info] [Info  - 10:23:45 AM] (11208) Server root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist
2025-02-24 10:23:45.452 [info] [Info  - 10:23:45 AM] (11208) Pylance language server 2025.2.101 (pyright version 1.1.394, commit 8a3ad454) starting
2025-02-24 10:23:45.471 [info] [Info  - 10:23:45 AM] (11208) Starting service instance "test"
2025-02-24 10:23:45.685 [info] [Info  - 10:23:45 AM] (11208) Setting environmentName for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:23:45.706 [info] [Info  - 10:23:45 AM] (11208) Setting pythonPath for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:23:45.723 [info] [Info  - 10:23:45 AM] (11208) No include entries specified; assuming c:\Users\QWLHD\Documents\workspace\python\test
2025-02-24 10:23:45.725 [info] [Info  - 10:23:45 AM] (11208) Auto-excluding **/node_modules
2025-02-24 10:23:45.726 [info] [Info  - 10:23:45 AM] (11208) Auto-excluding **/__pycache__
2025-02-24 10:23:45.726 [info] [Info  - 10:23:45 AM] (11208) Auto-excluding **/.*
2025-02-24 10:23:45.740 [info] [Warn  - 10:23:45 AM] (11208) stubPath file:///c%3A/Users/QWLHD/Documents/workspace/python/test/__stubs__ is not a valid directory.
2025-02-24 10:23:45.862 [info] [Info  - 10:23:45 AM] (11208) Assuming Python version 3.13.2.final.0
2025-02-24 10:23:46.987 [info] [Info  - 10:23:46 AM] (11208) Found 1 source file
2025-02-24 10:23:47.661 [info] [Info  - 10:23:47 AM] (11208) Background analysis(1) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist
2025-02-24 10:23:47.690 [info] [Info  - 10:23:47 AM] (11208) Background analysis(1) started
2025-02-24 10:23:47.707 [info] [Info  - 10:23:47 AM] (11208) Indexer background runner(2) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist (index)
2025-02-24 10:23:47.724 [info] [Info  - 10:23:47 AM] (11208) Indexing(2) started
2025-02-24 10:23:49.242 [info] [Info  - 10:23:49 AM] (11208) scanned(2) 160 files over 1 exec env
2025-02-24 10:23:49.619 [info] [Info  - 10:23:49 AM] (11208) indexed(2) 160 files over 1 exec env
2025-02-24 10:23:49.722 [info] [Info  - 10:23:49 AM] (11208) Indexing finished(2).
2025-02-24 10:43:40.624 [info] [Info  - 10:43:40 AM] (11208) Indexer background runner(3) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist (refresh)
2025-02-24 10:43:40.624 [info] [Info  - 10:43:40 AM] (11208) Indexing(3) started
2025-02-24 10:43:42.779 [info] [Info  - 10:43:42 AM] (11208) [IDX(3)] Long operation: scan packages file:///c%3A/Users/QWLHD/Documents/workspace/python/test (2149ms)
2025-02-24 10:43:42.779 [info] [Info  - 10:43:42 AM] (11208) scanned(3) 160 files over 1 exec env
2025-02-24 10:43:43.259 [info] [Info  - 10:43:43 AM] (11208) indexed(3) 160 files over 1 exec env
2025-02-24 10:43:43.357 [info] [Info  - 10:43:43 AM] (11208) Indexing finished(3).
2025-02-24 10:46:45.056 [info] [Info  - 10:46:45 AM] (11208) Indexer background runner(4) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist (refresh)
2025-02-24 10:46:45.056 [info] [Info  - 10:46:45 AM] (11208) Indexing(4) started
2025-02-24 10:46:47.155 [info] [Info  - 10:46:47 AM] (11208) [IDX(4)] Long operation: scan packages file:///c%3A/Users/QWLHD/Documents/workspace/python/test (2090ms)
2025-02-24 10:46:47.155 [info] [Info  - 10:46:47 AM] (11208) scanned(4) 161 files over 1 exec env
2025-02-24 10:46:47.848 [info] [Info  - 10:46:47 AM] (11208) indexed(4) 161 files over 1 exec env
2025-02-24 10:46:48.016 [info] [Info  - 10:46:48 AM] (11208) Indexing finished(4).
2025-02-24 10:54:49.199 [info] [Info  - 10:54:49 AM] (11208) Starting service instance "<default>"
2025-02-24 10:54:49.288 [info] [Info  - 10:54:49 AM] (11208) Setting environmentName for service "<default>": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:54:49.289 [info] [Info  - 10:54:49 AM] (11208) Setting pythonPath for service "<default>": "c:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:54:49.289 [info] [Info  - 10:54:49 AM] (11208) No include entries specified; assuming \<default workspace root>
2025-02-24 10:54:49.290 [info] [Info  - 10:54:49 AM] (11208) Auto-excluding **/node_modules
2025-02-24 10:54:49.290 [info] [Info  - 10:54:49 AM] (11208) Auto-excluding **/__pycache__
2025-02-24 10:54:49.290 [info] [Info  - 10:54:49 AM] (11208) Auto-excluding **/.*
2025-02-24 10:54:49.446 [info] [Info  - 10:54:49 AM] (11208) Assuming Python version 3.13.2.final.0
2025-02-24 10:54:49.759 [info] [Error - 10:54:49 AM] (11208) File or directory "\<default workspace root>" does not exist.
2025-02-24 10:54:49.759 [info] [Info  - 10:54:49 AM] (11208) No source files found.
2025-02-24 10:54:50.217 [info] [Info  - 10:54:50 AM] (11208) Background analysis(5) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist
2025-02-24 10:54:50.220 [info] [Info  - 10:54:50 AM] (11208) Background analysis(5) started
2025-02-24 10:56:29.816 [info] [Info  - 10:56:29 AM] (11208) Indexer background runner(6) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist (refresh)
2025-02-24 10:56:29.817 [info] [Info  - 10:56:29 AM] (11208) Indexing(6) started
2025-02-24 10:56:30.964 [info] [Info  - 10:56:30 AM] (11208) scanned(6) 161 files over 1 exec env
2025-02-24 10:56:31.460 [info] [Info  - 10:56:31 AM] (11208) indexed(6) 161 files over 1 exec env
2025-02-24 10:56:31.579 [info] [Info  - 10:56:31 AM] (11208) Indexing finished(6).
2025-02-24 10:57:46.341 [info] (Client) Pylance async client (2025.2.101) started with python extension (2025.1.2025022102)
2025-02-24 10:57:47.182 [info] [Info  - 10:57:47 AM] (14416) Server root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist
2025-02-24 10:57:47.182 [info] [Info  - 10:57:47 AM] (14416) Pylance language server 2025.2.101 (pyright version 1.1.394, commit 8a3ad454) starting
2025-02-24 10:57:47.208 [info] [Info  - 10:57:47 AM] (14416) Starting service instance "test"
2025-02-24 10:57:47.457 [info] [Info  - 10:57:47 AM] (14416) Setting environmentName for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:57:47.458 [info] [Info  - 10:57:47 AM] (14416) Setting pythonPath for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:57:47.458 [info] [Info  - 10:57:47 AM] (14416) No include entries specified; assuming c:\Users\QWLHD\Documents\workspace\python\test
2025-02-24 10:57:47.458 [info] [Info  - 10:57:47 AM] (14416) Auto-excluding **/node_modules
2025-02-24 10:57:47.458 [info] [Info  - 10:57:47 AM] (14416) Auto-excluding **/__pycache__
2025-02-24 10:57:47.458 [info] [Info  - 10:57:47 AM] (14416) Auto-excluding **/.*
2025-02-24 10:57:47.458 [info] [Warn  - 10:57:47 AM] (14416) stubPath file:///c%3A/Users/QWLHD/Documents/workspace/python/test/__stubs__ is not a valid directory.
2025-02-24 10:57:47.625 [info] [Info  - 10:57:47 AM] (14416) Assuming Python version 3.13.2.final.0
2025-02-24 10:57:48.015 [info] [Info  - 10:57:48 AM] (14416) Found 1 source file
2025-02-24 10:57:49.585 [info] [Info  - 10:57:49 AM] (14416) Background analysis(1) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist
2025-02-24 10:57:49.874 [info] [Info  - 10:57:49 AM] (14416) Background analysis(1) started
2025-02-24 10:57:50.088 [info] [Info  - 10:57:50 AM] (14416) Indexer background runner(2) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist (index)
2025-02-24 10:57:50.090 [info] [Info  - 10:57:50 AM] (14416) Indexing(2) started
2025-02-24 10:57:51.187 [info] [Info  - 10:57:51 AM] (14416) [IDX(2)] Long operation: scan packages file:///c%3A/Users/QWLHD/Documents/workspace/python/test (2061ms)
2025-02-24 10:57:51.187 [info] [Info  - 10:57:51 AM] (14416) scanned(2) 161 files over 1 exec env
2025-02-24 10:57:51.479 [info] [Info  - 10:57:51 AM] (14416) indexed(2) 161 files over 1 exec env
2025-02-24 10:57:51.573 [info] [Info  - 10:57:51 AM] (14416) Indexing finished(2).
2025-02-24 10:58:31.180 [info] (Client) Pylance async client (2025.2.101) started with python extension (2025.1.2025022102)
2025-02-24 10:58:31.898 [info] [Info  - 10:58:31 AM] (16688) Server root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist
2025-02-24 10:58:31.899 [info] [Info  - 10:58:31 AM] (16688) Pylance language server 2025.2.101 (pyright version 1.1.394, commit 8a3ad454) starting
2025-02-24 10:58:31.899 [info] [Info  - 10:58:31 AM] (16688) Starting service instance "test"
2025-02-24 10:58:32.046 [info] [Info  - 10:58:32 AM] (16688) Setting environmentName for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:58:32.046 [info] [Info  - 10:58:32 AM] (16688) Setting pythonPath for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:58:32.047 [info] [Info  - 10:58:32 AM] (16688) No include entries specified; assuming c:\Users\QWLHD\Documents\workspace\python\test
2025-02-24 10:58:32.048 [info] [Info  - 10:58:32 AM] (16688) Auto-excluding **/node_modules
2025-02-24 10:58:32.049 [info] [Info  - 10:58:32 AM] (16688) Auto-excluding **/__pycache__
2025-02-24 10:58:32.049 [info] [Info  - 10:58:32 AM] (16688) Auto-excluding **/.*
2025-02-24 10:58:32.050 [info] [Warn  - 10:58:32 AM] (16688) stubPath file:///c%3A/Users/QWLHD/Documents/workspace/python/test/__stubs__ is not a valid directory.
2025-02-24 10:58:32.201 [info] [Info  - 10:58:32 AM] (16688) Assuming Python version 3.13.2.final.0
2025-02-24 10:58:32.534 [info] [Info  - 10:58:32 AM] (16688) Found 1 source file
2025-02-24 10:58:33.183 [info] [Info  - 10:58:33 AM] (16688) Background analysis(1) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist
2025-02-24 10:58:33.188 [info] [Info  - 10:58:33 AM] (16688) Background analysis(1) started
2025-02-24 10:58:33.541 [info] [Info  - 10:58:33 AM] (16688) Indexer background runner(2) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist (index)
2025-02-24 10:58:33.541 [info] [Info  - 10:58:33 AM] (16688) Indexing(2) started
2025-02-24 10:58:35.392 [info] [Info  - 10:58:35 AM] (16688) scanned(2) 161 files over 1 exec env
2025-02-24 10:58:35.781 [info] [Info  - 10:58:35 AM] (16688) indexed(2) 161 files over 1 exec env
2025-02-24 10:58:35.880 [info] [Info  - 10:58:35 AM] (16688) Indexing finished(2).
2025-02-24 10:58:46.695 [info] (Client) Pylance async client (2025.2.101) started with python extension (2025.1.2025022102)
2025-02-24 10:58:47.284 [info] [Info  - 10:58:47 AM] (24336) Server root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist
2025-02-24 10:58:47.302 [info] [Info  - 10:58:47 AM] (24336) Pylance language server 2025.2.101 (pyright version 1.1.394, commit 8a3ad454) starting
2025-02-24 10:58:47.303 [info] [Info  - 10:58:47 AM] (24336) Starting service instance "test"
2025-02-24 10:58:47.445 [info] [Info  - 10:58:47 AM] (24336) Setting environmentName for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:58:47.446 [info] [Info  - 10:58:47 AM] (24336) Setting pythonPath for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 10:58:47.447 [info] [Info  - 10:58:47 AM] (24336) No include entries specified; assuming c:\Users\QWLHD\Documents\workspace\python\test
2025-02-24 10:58:47.458 [info] [Info  - 10:58:47 AM] (24336) Auto-excluding **/node_modules
2025-02-24 10:58:47.459 [info] [Info  - 10:58:47 AM] (24336) Auto-excluding **/__pycache__
2025-02-24 10:58:47.459 [info] [Info  - 10:58:47 AM] (24336) Auto-excluding **/.*
2025-02-24 10:58:47.459 [info] [Warn  - 10:58:47 AM] (24336) stubPath file:///c%3A/Users/QWLHD/Documents/workspace/python/test/__stubs__ is not a valid directory.
2025-02-24 10:58:47.605 [info] [Info  - 10:58:47 AM] (24336) Assuming Python version 3.13.2.final.0
2025-02-24 10:58:47.931 [info] [Info  - 10:58:47 AM] (24336) Found 1 source file
2025-02-24 10:58:48.517 [info] [Info  - 10:58:48 AM] (24336) Background analysis(1) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist
2025-02-24 10:58:48.519 [info] [Info  - 10:58:48 AM] (24336) Background analysis(1) started
2025-02-24 10:58:48.838 [info] [Info  - 10:58:48 AM] (24336) Indexer background runner(2) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist (index)
2025-02-24 10:58:48.839 [info] [Info  - 10:58:48 AM] (24336) Indexing(2) started
2025-02-24 10:58:50.673 [info] [Info  - 10:58:50 AM] (24336) scanned(2) 161 files over 1 exec env
2025-02-24 10:58:50.999 [info] [Info  - 10:58:50 AM] (24336) indexed(2) 161 files over 1 exec env
2025-02-24 10:58:51.092 [info] [Info  - 10:58:51 AM] (24336) Indexing finished(2).
2025-02-24 11:00:51.559 [info] (Client) Pylance async client (2025.2.101) started with python extension (2025.1.2025022102)
2025-02-24 11:00:52.236 [info] [Info  - 11:00:52 AM] (20156) Server root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist
2025-02-24 11:00:52.238 [info] [Info  - 11:00:52 AM] (20156) Pylance language server 2025.2.101 (pyright version 1.1.394, commit 8a3ad454) starting
2025-02-24 11:00:52.258 [info] [Info  - 11:00:52 AM] (20156) Starting service instance "test"
2025-02-24 11:00:52.359 [info] [Info  - 11:00:52 AM] (20156) Setting environmentName for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 11:00:52.359 [info] [Info  - 11:00:52 AM] (20156) Setting pythonPath for service "test": "C:\Users\QWLHD\miniforge3\envs\main\python.exe"
2025-02-24 11:00:52.360 [info] [Info  - 11:00:52 AM] (20156) No include entries specified; assuming c:\Users\QWLHD\Documents\workspace\python\test
2025-02-24 11:00:52.361 [info] [Info  - 11:00:52 AM] (20156) Auto-excluding **/node_modules
2025-02-24 11:00:52.361 [info] [Info  - 11:00:52 AM] (20156) Auto-excluding **/__pycache__
2025-02-24 11:00:52.362 [info] [Info  - 11:00:52 AM] (20156) Auto-excluding **/.*
2025-02-24 11:00:52.362 [info] [Warn  - 11:00:52 AM] (20156) stubPath file:///c%3A/Users/QWLHD/Documents/workspace/python/test/__stubs__ is not a valid directory.
2025-02-24 11:00:52.489 [info] [Info  - 11:00:52 AM] (20156) Assuming Python version 3.13.2.final.0
2025-02-24 11:00:52.851 [info] [Info  - 11:00:52 AM] (20156) Found 1 source file
2025-02-24 11:00:53.445 [info] [Info  - 11:00:53 AM] (20156) Background analysis(1) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist
2025-02-24 11:00:53.447 [info] [Info  - 11:00:53 AM] (20156) Background analysis(1) started
2025-02-24 11:00:53.744 [info] [Info  - 11:00:53 AM] (20156) Indexer background runner(2) root directory: file:///c%3A/Users/QWLHD/.vscode/extensions/ms-python.vscode-pylance-2025.2.101/dist (index)
2025-02-24 11:00:53.744 [info] [Info  - 11:00:53 AM] (20156) Indexing(2) started
2025-02-24 11:00:55.517 [info] [Info  - 11:00:55 AM] (20156) scanned(2) 161 files over 1 exec env
2025-02-24 11:00:55.797 [info] [Info  - 11:00:55 AM] (20156) indexed(2) 161 files over 1 exec env
2025-02-24 11:00:55.886 [info] [Info  - 11:00:55 AM] (20156) Indexing finished(2).
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Feb 24, 2025
@syagev
Copy link

syagev commented Feb 27, 2025

I can confirm this is happening with many of pandas APIs. It's actually replicating the exact problem outlined in pandas-dev/pandas-stubs#691

@erictraut
Copy link
Contributor

This is likely due to this pyright issue.

@rchiodo rchiodo closed this as completed Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

5 participants