-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Labels
refactorImproves code itself, but does not fix a bug or add new functionality.Improves code itself, but does not fix a bug or add new functionality.
Description
We still use the old syntax and types. For example, we say something like:
def foo(x: Optional[List[Union[int, float]]]):While the newer way would be:
def foo(x: list[int | float] | None):Using list versus List is supported since Python 3.9, and the better optional and union syntax since 3.10. Our minimum has been 3.10 since TorchCodec v0.8. See: https://docs.python.org/3/library/typing.html
NicolasHug
Metadata
Metadata
Assignees
Labels
refactorImproves code itself, but does not fix a bug or add new functionality.Improves code itself, but does not fix a bug or add new functionality.