Skip to content

Commit 46426e9

Browse files
use typing.Type for python3.7
1 parent d3d2573 commit 46426e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/setuptools_scm/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from typing import Callable
99
from typing import cast
1010
from typing import Pattern
11+
from typing import Type
1112
from typing import TYPE_CHECKING
1213
from typing import Union
1314

@@ -96,7 +97,7 @@ def _validate_version_cls(
9697

9798
pkg, cls_name = version_cls.rsplit(".", 1)
9899
version_cls_host = importlib.import_module(pkg)
99-
return cast(type[_VersionT], getattr(version_cls_host, cls_name))
100+
return cast(Type[_VersionT], getattr(version_cls_host, cls_name))
100101
except: # noqa
101102
raise ValueError(f"Unable to import version_cls='{version_cls}'")
102103
else:

0 commit comments

Comments
 (0)