mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-24 21:01:52 +08:00
add re.template (#1330)
This commit is contained in:
committed by
Guido van Rossum
parent
890190d349
commit
89f27742ca
@@ -97,3 +97,4 @@ def subn(pattern: Union[Pattern[str], Pattern[unicode]], repl: Callable[[Match[A
|
||||
def escape(string: AnyStr) -> AnyStr: ...
|
||||
|
||||
def purge() -> None: ...
|
||||
def template(pattern: Union[AnyStr, Pattern[AnyStr]], flags: int = ...) -> Pattern[AnyStr]: ...
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
from typing import (
|
||||
List, Iterator, overload, Callable, Tuple, Sequence, Dict,
|
||||
Generic, AnyStr, Match, Pattern, Any, Optional
|
||||
Generic, AnyStr, Match, Pattern, Any, Optional, Union
|
||||
)
|
||||
|
||||
# ----- re variables and constants -----
|
||||
@@ -26,6 +26,8 @@ X = 0
|
||||
VERBOSE = 0
|
||||
U = 0
|
||||
UNICODE = 0
|
||||
T = 0
|
||||
TEMPLATE = 0
|
||||
|
||||
class error(Exception): ...
|
||||
|
||||
@@ -104,3 +106,4 @@ def subn(pattern: Pattern[AnyStr], repl: Callable[[Match[AnyStr]], AnyStr],
|
||||
def escape(string: AnyStr) -> AnyStr: ...
|
||||
|
||||
def purge() -> None: ...
|
||||
def template(pattern: Union[AnyStr, Pattern[AnyStr]], flags: int = ...) -> Pattern[AnyStr]: ...
|
||||
|
||||
Reference in New Issue
Block a user