From fabaf7bdfb05356e73acbe71076f52e21ad0fc0d Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Wed, 13 Mar 2024 13:23:31 -0400 Subject: [PATCH] Fix Python 3.9 compatibility --- src/sixs_bin/__init__.py | 3 ++- test/test_cli.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sixs_bin/__init__.py b/src/sixs_bin/__init__.py index c6aa9e4..dcefb9c 100644 --- a/src/sixs_bin/__init__.py +++ b/src/sixs_bin/__init__.py @@ -20,13 +20,14 @@ import importlib.metadata import importlib.resources import pathlib -from typing import TYPE_CHECKING, Final, Literal, TypeAlias +from typing import TYPE_CHECKING, Final, Literal # Py6S may not be installed. if TYPE_CHECKING: from importlib.abc import Traversable from Py6S import SixS + from typing_extensions import TypeAlias SixSVersion: TypeAlias = Literal["1.1", "2.1"] diff --git a/test/test_cli.py b/test/test_cli.py index 0994bd3..6fe41e6 100644 --- a/test/test_cli.py +++ b/test/test_cli.py @@ -82,7 +82,7 @@ def test_exec_matches(sixs_version, manual_input_file, helpers) -> None: # between runs have been observed. rel_tol = 1e-3 if sys.platform in ("darwin", "win32") else 1e-09 - for d_line, c_line in zip(direct_lines, cli_lines, strict=True): + for d_line, c_line in zip(direct_lines, cli_lines): helpers.assert_embedded_isclose(d_line, c_line, rel_tol=rel_tol)