From 13ccfbae05d65a00d2f0199ba2cb712d521a8d17 Mon Sep 17 00:00:00 2001 From: Nils Homer Date: Tue, 21 Nov 2023 14:34:50 -0700 Subject: [PATCH] fix --- fgpyo/util/inspect.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fgpyo/util/inspect.py b/fgpyo/util/inspect.py index 6a69a6b5..5d95a7fe 100644 --- a/fgpyo/util/inspect.py +++ b/fgpyo/util/inspect.py @@ -5,9 +5,10 @@ from typing import Type from typing import Union -try: # py>=38 +import sys +if sys.version_info >= (3, 8): from typing import Literal -except ImportError: # py<38 +else: from typing_extensions import Literal import functools