File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 11from __future__ import annotations
22
33import enum
4- import sys
54import typing as t
65
76import click
1110from ..regex_variants import RegexImplementation , RegexVariantName
1211from ..transforms import Transform
1312
14- if sys .version_info >= (3 , 8 ):
15- from typing import Literal
16- else :
17- from typing_extensions import Literal
18-
1913
2014class SchemaLoadingMode (enum .Enum ):
2115 filepath = "filepath"
@@ -51,11 +45,11 @@ def __init__(self) -> None:
5145
5246 def set_regex_variant (
5347 self ,
54- variant_opt : Literal ["python" , "nonunicode" , "default" ] | None ,
48+ variant_opt : t . Literal ["python" , "nonunicode" , "default" ] | None ,
5549 * ,
56- legacy_opt : Literal ["python" , "nonunicode" , "default" ] | None = None ,
50+ legacy_opt : t . Literal ["python" , "nonunicode" , "default" ] | None = None ,
5751 ) -> None :
58- variant_name : Literal ["python" , "nonunicode" , "default" ] | None = (
52+ variant_name : t . Literal ["python" , "nonunicode" , "default" ] | None = (
5953 variant_opt or legacy_opt
6054 )
6155 if variant_name :
You can’t perform that action at this time.
0 commit comments