diff --git a/pyproject.toml b/pyproject.toml index 5897e1aa8a..098889276b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,6 @@ classifiers = [ ] dependencies = [ "click >= 8.0.0", - "typing-extensions >= 3.7.4.3", ] readme = "README.md" diff --git a/typer/_typing.py b/typer/_typing.py index 15d0e91b65..a8149f1c16 100644 --- a/typer/_typing.py +++ b/typer/_typing.py @@ -61,9 +61,7 @@ def is_callable_type(type_: type[Any]) -> bool: def is_literal_type(type_: type[Any]) -> bool: - import typing_extensions - - return get_origin(type_) in (Literal, typing_extensions.Literal) + return get_origin(type_) is Literal def literal_values(type_: type[Any]) -> tuple[Any, ...]: diff --git a/uv.lock b/uv.lock index aa96ca3fb5..5de8d6094d 100644 --- a/uv.lock +++ b/uv.lock @@ -2233,7 +2233,6 @@ dependencies = [ { name = "click", version = "8.3.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, { name = "rich" }, { name = "shellingham" }, - { name = "typing-extensions" }, ] [package.dev-dependencies] @@ -2300,7 +2299,6 @@ requires-dist = [ { name = "click", specifier = ">=8.0.0" }, { name = "rich", specifier = ">=10.11.0" }, { name = "shellingham", specifier = ">=1.3.0" }, - { name = "typing-extensions", specifier = ">=3.7.4.3" }, ] [package.metadata.requires-dev]