From c751ec9b6beaad2520f7c4512c8d65b732cc0518 Mon Sep 17 00:00:00 2001 From: Samuel Cahyawijaya Date: Thu, 22 Sep 2022 09:56:55 +0800 Subject: [PATCH] add typing_extensions for py<3.8 --- nusacrowd/nusa_datasets/id_panl_bppt/id_panl_bppt.py | 7 ++++++- requirements.txt | 3 ++- setup.cfg | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/nusacrowd/nusa_datasets/id_panl_bppt/id_panl_bppt.py b/nusacrowd/nusa_datasets/id_panl_bppt/id_panl_bppt.py index aef1d4d9..533e7dbe 100644 --- a/nusacrowd/nusa_datasets/id_panl_bppt/id_panl_bppt.py +++ b/nusacrowd/nusa_datasets/id_panl_bppt/id_panl_bppt.py @@ -1,5 +1,10 @@ import os -from typing import Dict, List, Literal, Tuple, TypedDict +from typing import Dict, List, Tuple, TypedDict + +try: + from typing import Literal +except ImportError: + from typing_extensions import Literal import datasets diff --git a/requirements.txt b/requirements.txt index 44fb84b0..083a19fd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,4 +18,5 @@ soundfile torchaudio==0.11 ffmpeg conllu -openpyxl \ No newline at end of file +openpyxl +typing_extensions \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index d913a1b1..dd026ad5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,6 +27,7 @@ install_requires = ffmpeg conllu openpyxl + typing_extensions [options.extras_require] dev =