microsoft / PTVS

Python Tools for Visual Studio
https://aka.ms/PTVS
Apache License 2.0
2.52k stars 675 forks source link

No change with the type information when change the sys.exc_info with the latest typeshed. #7974

Open linette-zyy opened 1 month ago

linette-zyy commented 1 month ago

Environment image

Steps to Reproduce 1.git clone https://github.com/python/typeshed

open typeshed/stdlib/sys/init.pyi, add from typing import Optional, Tuple, Type to typeshed/stdlib/sys/init.pyi open typeshed/stdlib/sys/init.pyi, change

With this instead: def exc_info() -> Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[_version_info]]: …

2.create a PythonApplication1.py, enter the local path on disk where you cloned the repository Options image

3.Restart VS and enter the following code import sys e1,e2,e3=sys.exc_info()

Expected behavior It should now report e3 as being a version info instance image

Additional context and screenshots The type information has not changed with latest typeshed. image

StellaHuang95 commented 4 weeks ago

I can repro this one, this is a regression.

StellaHuang95 commented 5 hours ago

@linette-zyy can you check if it still repros? Thanks!