Skip to content

Commit

Permalink
Merge pull request #672 from RonnyPfannschmidt/fix-python-360
Browse files Browse the repository at this point in the history
fix #671: hide NoReturn from very old python 3.6
  • Loading branch information
RonnyPfannschmidt authored Jan 19, 2022
2 parents c585e20 + ee5944f commit 645bd23
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v6.4.2
======

* fix #671 : NoReturn is not avaliable in painfully dead python 3.6


v6.4.1
=======

Expand Down
8 changes: 6 additions & 2 deletions src/setuptools_scm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"""
import os
import warnings
from typing import NoReturn
from typing import Optional
from typing import TYPE_CHECKING

from . import _types
from ._entrypoints import _call_entrypoint_fn
Expand All @@ -27,6 +27,10 @@
from .version import meta
from .version import ScmVersion

if TYPE_CHECKING:
from typing import NoReturn


TEMPLATES = {
".py": """\
# coding: utf-8
Expand Down Expand Up @@ -98,7 +102,7 @@ def _do_parse(config: Configuration) -> "ScmVersion|None":
return version


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

0 comments on commit 645bd23

Please sign in to comment.