Skip to content

Replace typing hints with new version #3481

@vfdev-5

Description

@vfdev-5

Typing improvements we can make the change: Optional[Union[int, float]] = None into int | float = None which should be OK starting from python 3.10

We should replace all:

  • Union[A, B] with A | B
  • Optional[A] with A | None
  • Tuple -> tuple, List -> list, etc
    in the function signature and also of the output type hint
- from typing import Callable, Mapping
+ from collections.abc import Callable, Mapping

python 3.9 is EOL, min supported python version is 3.10.

It is a large issue, multiple people can work on it.
If you plan to work on it. Make changes in a single file and submit a PR. Smaller PR == easy review == quicker merging.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions