diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2021-04-24 10:00:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-24 10:00:40 +0800 |
commit | 730177174bbc721fba8fbdcd28aa347b3ad75576 (patch) | |
tree | d9f504fe5a7b0e0c4332ae31b48adfd391d3e7f5 /git/compat/typing.py | |
parent | 4119a576251448793c07ebd080534948cad2f170 (diff) | |
parent | 9448c082b158dcab960d33982e8189f2d2da4729 (diff) | |
download | gitpython-730177174bbc721fba8fbdcd28aa347b3ad75576.tar.gz |
Merge pull request #1218 from mgorny/typing-ext
Use typing-extensions only on Python < 3.8
Diffstat (limited to 'git/compat/typing.py')
-rw-r--r-- | git/compat/typing.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/git/compat/typing.py b/git/compat/typing.py new file mode 100644 index 00000000..925c5ba2 --- /dev/null +++ b/git/compat/typing.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# config.py +# Copyright (C) 2021 Michael Trier (mtrier@gmail.com) and contributors +# +# This module is part of GitPython and is released under +# the BSD License: http://www.opensource.org/licenses/bsd-license.php + +import sys + +if sys.version_info[:2] >= (3, 8): + from typing import Final, Literal # noqa: F401 +else: + from typing_extensions import Final, Literal # noqa: F401 |