Skip to content

Issue with type hints and Python 3.9 #1

Description

@edoardob90

The return type hint dict | None is supported since Python 3.10. The following line triggers a TypeError if python3 invokes system's Python <3.10 (e.g., on macOS, 3.9.x seems to be the default version):

def get_state(session_id: str) -> dict | None:

I think a simple from __future__ import annotations works fine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions