mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Add the rest of string.Template's class attributes (#6109)
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
import sys
|
||||
from re import RegexFlag
|
||||
from typing import Any, Iterable, Mapping, Sequence, Tuple
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
from re import Pattern
|
||||
else:
|
||||
from typing import Pattern
|
||||
|
||||
ascii_letters: str
|
||||
ascii_lowercase: str
|
||||
ascii_uppercase: str
|
||||
@@ -14,6 +21,11 @@ def capwords(s: str, sep: str | None = ...) -> str: ...
|
||||
|
||||
class Template:
|
||||
template: str
|
||||
delimiter: str
|
||||
idpattern: str
|
||||
braceidpattern: str | None
|
||||
flags: RegexFlag
|
||||
pattern: Pattern[str]
|
||||
def __init__(self, template: str) -> None: ...
|
||||
def substitute(self, __mapping: Mapping[str, object] = ..., **kwds: object) -> str: ...
|
||||
def safe_substitute(self, __mapping: Mapping[str, object] = ..., **kwds: object) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user