microsoft / microsoft/TypeChat
[python] Upgrade the imports in examples
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8.7k
- Forks
- 414
- Avg merge
- 3h 8m
- Merged PRs (30d)
- 3
Description
Pyupgrade recommends:
import asyncio
from typing import Annotated, Literal, TypedDict
import dotenv
from typing_extensions import Doc
As everything but Doc has been in typing since 3.8 or 3.9:
https://docs.python.org/3/library/typing.html#typing.Literal
Apparently Doc is non-standard, interesting discussion on the PEP here:
https://discuss.python.org/t/pep-727-documentation-metadata-in-typing/32566/172
It seems unlikely to get accepted, but I assume its the only way to document when using TypedDict? That's what I saw in the examples.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Python files under the examples and compare their imports with the pyupgrade recommendation in the issue. Update the standard-library typing imports while preserving the separate handling for Doc, then verify the examples use the recommended imports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100