Fix various __all__-related typos and omissions (#7378)

This commit is contained in:
Alex Waygood
2022-02-25 13:10:00 +00:00
committed by GitHub
parent f4b43daba0
commit d2ddda00cf
8 changed files with 14 additions and 7 deletions

View File

@@ -10,6 +10,9 @@ if sys.platform == "win32":
__all__ = ("pipe", "Popen", "PIPE", "PipeHandle")
else:
__all__ = ["socketpair", "pipe", "Popen", "PIPE", "PipeHandle"]
import socket
socketpair = socket.socketpair
class _WarnFunction(Protocol):
def __call__(

View File

@@ -6,7 +6,7 @@ from types import TracebackType
from typing import Any, Callable, Iterable, Iterator, TextIO
from typing_extensions import Literal
__all__ = ["FTP", "error_reply", "error_temp", "error_perm", "error_proto", "all_errors"]
__all__ = ["FTP", "error_reply", "error_temp", "error_perm", "error_proto", "all_errors", "FTP_TLS"]
MSG_OOB: Literal[1]
FTP_PORT: Literal[21]

View File

@@ -20,7 +20,8 @@ __all__ = [
"normalize",
"LC_CTYPE",
"LC_COLLATE",
"LC_MESSAGES" "LC_TIME",
"LC_MESSAGES",
"LC_TIME",
"LC_MONETARY",
"LC_NUMERIC",
"LC_ALL",

View File

@@ -62,6 +62,7 @@ if sys.version_info >= (3, 8):
"get_context",
"get_logger",
"get_start_method",
"parent_process",
"log_to_stderr",
"reducer",
"set_executable",

View File

@@ -11,6 +11,11 @@ from multiprocessing.sharedctypes import SynchronizedArray, SynchronizedBase
from typing import Any, TypeVar, Union, overload
from typing_extensions import Literal
if sys.version_info >= (3, 8):
__all__ = ()
else:
__all__: list[str] = []
_LockLike = Union[synchronize.Lock, synchronize.RLock]
_CT = TypeVar("_CT", bound=_CData)

View File

@@ -126,7 +126,7 @@ class RegexFlag(enum.IntFlag):
T = sre_compile.SRE_FLAG_TEMPLATE
TEMPLATE = T
if sys.version_info >= (3, 11):
NO_FLAG: int
NOFLAG: int
A = RegexFlag.A
ASCII = RegexFlag.ASCII
@@ -146,7 +146,7 @@ UNICODE = RegexFlag.UNICODE
T = RegexFlag.T
TEMPLATE = RegexFlag.TEMPLATE
if sys.version_info >= (3, 11):
NO_FLAG = RegexFlag.NO_FLAG
NOFLAG = RegexFlag.NOFLAG
_FlagsType = Union[int, RegexFlag]
if sys.version_info < (3, 7):

View File

@@ -155,14 +155,12 @@ else:
"AsyncGeneratorType",
"MethodType",
"BuiltinFunctionType",
"ClassMethodDescriptorType",
"ModuleType",
"TracebackType",
"FrameType",
"GetSetDescriptorType",
"MemberDescriptorType",
"new_class",
"resolve_bases",
"prepare_class",
"DynamicClassAttribute",
"coroutine",

View File

@@ -16,5 +16,4 @@ hashlib.scrypt
os.startfile
# Exists at runtime, but missing from stubs
asyncio.windows_utils.socketpair
venv.EnvBuilder.include_binary