Closed priitlatt closed 2 weeks ago
Fixes #412.
PR #411 introduced a regression by using the following import statement:
from typing import Literal
This is because typing.Literal was added only in Python 3.8, and consequently this statement fails when run on Python 3.7.
typing.Literal
As a workaround import Literal from typing_extensions module only when performing type checks as is done here for example.
Literal
typing_extensions
Fixes #412.
PR #411 introduced a regression by using the following import statement:
This is because
typing.Literal
was added only in Python 3.8, and consequently this statement fails when run on Python 3.7.As a workaround import
Literal
fromtyping_extensions
module only when performing type checks as is done here for example.