microsoft / microsoft/PTVS

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

Open
#7,974 3 comments 0 reactions 1 assignee View on GitHub

@AdamYoblick is already working on this.

Since Aug 7, 2024.

bug P2
Dominant language
C#
Stars
2.6k
Forks
680
Avg merge
39m
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.