Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotations: Adhere to PEP 604 / Leverage Built-In 3.10 Functionality #260

Open
thomaschhh opened this issue Sep 23, 2024 · 0 comments · May be fixed by #262
Open

Annotations: Adhere to PEP 604 / Leverage Built-In 3.10 Functionality #260

thomaschhh opened this issue Sep 23, 2024 · 0 comments · May be fixed by #262
Assignees

Comments

@thomaschhh
Copy link
Member

Feature request

Adjust type annotations so that they adhere to PEP 604 and to leverage Python 3.10 functionality.

def foo(data: dict[str, list[tuple[int, str]]]) -> dict[str, list[int | str]]:
    ...

instead of

from typing import Dict, List, Tuple, Union

def foo(data: Dict[str, List[Tuple[int, str]]]) -> Dict[str, List[Union[int, str]]]:
    ...

Motivation

Improves code readabilty and code quality.

@thomaschhh thomaschhh self-assigned this Sep 23, 2024
@thomaschhh thomaschhh linked a pull request Sep 24, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant