diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 0856c037f2..0000000000 --- a/.coveragerc +++ /dev/null @@ -1,3 +0,0 @@ -[report] -exclude_lines = - if TYPE_CHECKING: diff --git a/src/pyhf/typing.py b/src/pyhf/typing.py index bdfa44f85c..50a6237199 100644 --- a/src/pyhf/typing.py +++ b/src/pyhf/typing.py @@ -1,6 +1,6 @@ import os import sys -from typing import TYPE_CHECKING, MutableSequence, Sequence, Union +from typing import MutableSequence, Sequence, Union if sys.version_info >= (3, 8): from typing import Literal, TypedDict @@ -27,10 +27,8 @@ "Workspace", ) -if TYPE_CHECKING: - PathOrStr = Union[str, os.PathLike[str]] -else: - PathOrStr = Union[str, "os.PathLike[str]"] +# TODO: Switch to os.PathLike[str] once Python 3.8 support dropped +PathOrStr = Union[str, "os.PathLike[str]"] class ParameterBase(TypedDict, total=False):