From d47534e2ada24cf393df2f2912f3e1d5f8723b17 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 18 Dec 2023 08:50:49 +0800 Subject: [PATCH] interpret_demo: add typing.Literal --- nac3standalone/demo/interpret_demo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nac3standalone/demo/interpret_demo.py b/nac3standalone/demo/interpret_demo.py index a178ae2f4..830e86d9b 100755 --- a/nac3standalone/demo/interpret_demo.py +++ b/nac3standalone/demo/interpret_demo.py @@ -9,7 +9,7 @@ import pathlib from numpy import int32, int64, uint32, uint64 from scipy import special -from typing import TypeVar, Generic +from typing import TypeVar, Generic, Literal T = TypeVar('T') class Option(Generic[T]): @@ -107,6 +107,7 @@ def patch(module): module.TypeVar = TypeVar module.ConstGeneric = ConstGeneric module.Generic = Generic + module.Literal = Literal module.extern = extern module.Option = Option module.Some = Some