Skip to content

Commit ee5944f

Browse files
fix #671: hide NoReturn from very old python 3.6
1 parent c585e20 commit ee5944f

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

CHANGELOG.rst

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
v6.4.2
2+
======
3+
4+
* fix #671 : NoReturn is not avaliable in painfully dead python 3.6
5+
6+
17
v6.4.1
28
=======
39

src/setuptools_scm/__init__.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"""
55
import os
66
import warnings
7-
from typing import NoReturn
87
from typing import Optional
8+
from typing import TYPE_CHECKING
99

1010
from . import _types
1111
from ._entrypoints import _call_entrypoint_fn
@@ -27,6 +27,10 @@
2727
from .version import meta
2828
from .version import ScmVersion
2929

30+
if TYPE_CHECKING:
31+
from typing import NoReturn
32+
33+
3034
TEMPLATES = {
3135
".py": """\
3236
# coding: utf-8
@@ -98,7 +102,7 @@ def _do_parse(config: Configuration) -> "ScmVersion|None":
98102
return version
99103

100104

101-
def _version_missing(config) -> NoReturn:
105+
def _version_missing(config) -> "NoReturn":
102106
raise LookupError(
103107
f"setuptools-scm was unable to detect version for {config.absolute_root}.\n\n"
104108
"Make sure you're either building from a fully intact git repository "

0 commit comments

Comments
 (0)