Skip to content

Commit 47e9788

Browse files
authored
Add the rest of string.Template's class attributes (#6109)
1 parent ad7d478 commit 47e9788

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

stdlib/string.pyi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
import sys
2+
from re import RegexFlag
13
from typing import Any, Iterable, Mapping, Sequence, Tuple
24

5+
if sys.version_info >= (3, 8):
6+
from re import Pattern
7+
else:
8+
from typing import Pattern
9+
310
ascii_letters: str
411
ascii_lowercase: str
512
ascii_uppercase: str
@@ -14,6 +21,11 @@ def capwords(s: str, sep: str | None = ...) -> str: ...
1421

1522
class Template:
1623
template: str
24+
delimiter: str
25+
idpattern: str
26+
braceidpattern: str | None
27+
flags: RegexFlag
28+
pattern: Pattern[str]
1729
def __init__(self, template: str) -> None: ...
1830
def substitute(self, __mapping: Mapping[str, object] = ..., **kwds: object) -> str: ...
1931
def safe_substitute(self, __mapping: Mapping[str, object] = ..., **kwds: object) -> str: ...

0 commit comments

Comments
 (0)