From 18b75d9e63f513e972cbc09c06b040bcdb15aa05 Mon Sep 17 00:00:00 2001 From: yobmod Date: Mon, 3 May 2021 16:02:11 +0100 Subject: copy sys.version checks for literal and final to git.types --- git/types.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/git/types.py b/git/types.py index 3e33ae0c..40d4f788 100644 --- a/git/types.py +++ b/git/types.py @@ -6,6 +6,11 @@ import os import sys from typing import Union, Any +if sys.version_info[:2] >= (3, 8): + from typing import Final, Literal # noqa: F401 +else: + from typing_extensions import Final, Literal # noqa: F401 + TBD = Any -- cgit v1.2.1