Add __all__ to most modules beginning with 'q', 'r' and 's' (#7364)

This commit is contained in:
Alex Waygood
2022-02-23 00:51:54 +00:00
committed by GitHub
parent 240628c4dd
commit a3bb5af4a0
19 changed files with 364 additions and 0 deletions

View File

@@ -9,6 +9,103 @@ if sys.version_info >= (3, 7):
else:
from typing import Match, Pattern
if sys.version_info >= (3, 11):
__all__ = [
"match",
"fullmatch",
"search",
"sub",
"subn",
"split",
"findall",
"finditer",
"compile",
"purge",
"template",
"escape",
"error",
"Pattern",
"Match",
"A",
"I",
"L",
"M",
"S",
"X",
"U",
"ASCII",
"IGNORECASE",
"LOCALE",
"MULTILINE",
"DOTALL",
"VERBOSE",
"UNICODE",
"RegexFlag",
"NOFLAG",
]
elif sys.version_info >= (3, 8):
__all__ = [
"match",
"fullmatch",
"search",
"sub",
"subn",
"split",
"findall",
"finditer",
"compile",
"purge",
"template",
"escape",
"error",
"Pattern",
"Match",
"A",
"I",
"L",
"M",
"S",
"X",
"U",
"ASCII",
"IGNORECASE",
"LOCALE",
"MULTILINE",
"DOTALL",
"VERBOSE",
"UNICODE",
]
else:
__all__ = [
"match",
"fullmatch",
"search",
"sub",
"subn",
"split",
"findall",
"finditer",
"compile",
"purge",
"template",
"escape",
"error",
"A",
"I",
"L",
"M",
"S",
"X",
"U",
"ASCII",
"IGNORECASE",
"LOCALE",
"MULTILINE",
"DOTALL",
"VERBOSE",
"UNICODE",
]
class RegexFlag(enum.IntFlag):
A: int
ASCII: int