From a956a02026f4173540dc7acdf3c914e03d409d65 Mon Sep 17 00:00:00 2001 From: andrewtarzia Date: Wed, 25 Sep 2024 15:26:13 +0200 Subject: [PATCH] Change typing to work with Python 3.9. --- python/chemiscope/structures/_stk.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/chemiscope/structures/_stk.py b/python/chemiscope/structures/_stk.py index 4ffb34b60..9f2aab13b 100644 --- a/python/chemiscope/structures/_stk.py +++ b/python/chemiscope/structures/_stk.py @@ -1,3 +1,4 @@ +import typing from collections import Counter try: @@ -9,7 +10,7 @@ def _stk_valid_structures( - frames: stk.Molecule | list[stk.Molecule], + frames: typing.Union(stk.Molecule, list[stk.Molecule]), ) -> tuple[list[stk.Molecule], bool]: if HAVE_STK and isinstance(frames, stk.Molecule): # deal with the user passing a single frame