Skip to content

[python] Upgrade the imports in examples #220

@pamelafox

Description

@pamelafox

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language: PythonPertains to the Python implementation of TypeChat.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions