From 359817bde9c2701120d0e8aad6b2ef7495abefe4 Mon Sep 17 00:00:00 2001 From: Rune Tynan Date: Fri, 29 Nov 2019 09:03:45 -0500 Subject: [PATCH] In python versions 3.7 and above, re-export Pattern and Match (#3510) --- stdlib/3/re.pyi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stdlib/3/re.pyi b/stdlib/3/re.pyi index 9fb77420d..259f787c6 100644 --- a/stdlib/3/re.pyi +++ b/stdlib/3/re.pyi @@ -8,10 +8,15 @@ import sys from typing import ( List, Iterator, overload, Callable, Tuple, - AnyStr, Match, Pattern, Any, Optional, Union + AnyStr, Any, Optional, Union ) # ----- re variables and constants ----- +if sys.version_info >= (3, 7): + from typing import Pattern as Pattern, Match as Match +else: + from typing import Pattern, Match + if sys.version_info >= (3, 6): import enum class RegexFlag(enum.IntFlag):