From 9bb03d0e0e03908a51e1d4007b524bdf5456ee44 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sun, 21 Jan 2024 16:50:05 -0800 Subject: [PATCH 01/30] Changed enums to conform with proposed change to typing spec discussed [here](https://discuss.python.org/t/draft-of-typing-spec-chapter-for-enums/43496/9) and [here](https://github.com/python/typing-council/issues/11). This is an experiment to understand the potential impact of this change: DO NOT MERGE --- stdlib/asyncio/constants.pyi | 6 +- stdlib/asyncio/locks.pyi | 8 +- stdlib/asyncio/sslproto.pyi | 18 +- stdlib/http/__init__.pyi | 136 ++-- stdlib/inspect.pyi | 48 +- stdlib/plistlib.pyi | 4 +- stdlib/pstats.pyi | 18 +- stdlib/py_compile.pyi | 6 +- stdlib/signal.pyi | 92 +-- stdlib/socket.pyi | 150 ++-- stdlib/ssl.pyi | 162 ++--- stdlib/tkinter/__init__.pyi | 74 +- stdlib/uuid.pyi | 6 +- stubs/Pillow/PIL/BlpImagePlugin.pyi | 14 +- stubs/Pillow/PIL/ExifTags.pyi | 662 +++++++++--------- stubs/Pillow/PIL/FtexImagePlugin.pyi | 4 +- stubs/Pillow/PIL/Image.pyi | 56 +- stubs/Pillow/PIL/ImageCms.pyi | 14 +- stubs/Pillow/PIL/ImageFont.pyi | 4 +- stubs/Pillow/PIL/PngImagePlugin.pyi | 10 +- .../aws_xray_sdk/core/sampling/reservoir.pyi | 6 +- stubs/fpdf2/fpdf/enums.pyi | 326 ++++----- .../client/flux_csv_parser.pyi | 10 +- .../influxdb_client/client/write_api.pyi | 6 +- stubs/pika/pika/delivery_mode.pyi | 4 +- stubs/pika/pika/exchange_type.pyi | 8 +- stubs/psutil/psutil/_common.pyi | 10 +- stubs/psutil/psutil/_pslinux.pyi | 8 +- stubs/psutil/psutil/_pswindows.pyi | 20 +- stubs/pynput/pynput/keyboard/_base.pyi | 128 ++-- stubs/pynput/pynput/mouse/_base.pyi | 66 +- stubs/redis/redis/asyncio/connection.pyi | 2 +- stubs/regex/regex/_regex_core.pyi | 68 +- .../setuptools/command/editable_wheel.pyi | 6 +- 34 files changed, 1080 insertions(+), 1080 deletions(-) diff --git a/stdlib/asyncio/constants.pyi b/stdlib/asyncio/constants.pyi index 559cc02a0faa..6bfe2f2789f0 100644 --- a/stdlib/asyncio/constants.pyi +++ b/stdlib/asyncio/constants.pyi @@ -15,6 +15,6 @@ if sys.version_info >= (3, 12): THREAD_JOIN_TIMEOUT: Literal[300] class _SendfileMode(enum.Enum): - UNSUPPORTED: int - TRY_NATIVE: int - FALLBACK: int + UNSUPPORTED = ... + TRY_NATIVE = ... + FALLBACK = ... diff --git a/stdlib/asyncio/locks.pyi b/stdlib/asyncio/locks.pyi index 835ffa231749..59d6e3bd4505 100644 --- a/stdlib/asyncio/locks.pyi +++ b/stdlib/asyncio/locks.pyi @@ -98,10 +98,10 @@ class BoundedSemaphore(Semaphore): ... if sys.version_info >= (3, 11): class _BarrierState(enum.Enum): # undocumented - FILLING: str - DRAINING: str - RESETTING: str - BROKEN: str + FILLING = ... + DRAINING = ... + RESETTING = ... + BROKEN = ... class Barrier(_LoopBoundMixin): def __init__(self, parties: int) -> None: ... diff --git a/stdlib/asyncio/sslproto.pyi b/stdlib/asyncio/sslproto.pyi index 5dcca950e819..a99b0e3771a2 100644 --- a/stdlib/asyncio/sslproto.pyi +++ b/stdlib/asyncio/sslproto.pyi @@ -14,17 +14,17 @@ if sys.version_info >= (3, 11): SSLAgainErrors: tuple[type[ssl.SSLWantReadError], type[ssl.SSLSyscallError]] class SSLProtocolState(Enum): - UNWRAPPED: str - DO_HANDSHAKE: str - WRAPPED: str - FLUSHING: str - SHUTDOWN: str + UNWRAPPED = ... + DO_HANDSHAKE = ... + WRAPPED = ... + FLUSHING = ... + SHUTDOWN = ... class AppProtocolState(Enum): - STATE_INIT: str - STATE_CON_MADE: str - STATE_EOF: str - STATE_CON_LOST: str + STATE_INIT = ... + STATE_CON_MADE = ... + STATE_EOF = ... + STATE_CON_LOST = ... def add_flowcontrol_defaults(high: int | None, low: int | None, kb: int) -> tuple[int, int]: ... else: diff --git a/stdlib/http/__init__.pyi b/stdlib/http/__init__.pyi index 2eee06fdaaa9..b4ec9ae252a1 100644 --- a/stdlib/http/__init__.pyi +++ b/stdlib/http/__init__.pyi @@ -15,65 +15,65 @@ class HTTPStatus(IntEnum): def phrase(self) -> str: ... @property def description(self) -> str: ... - CONTINUE: int - SWITCHING_PROTOCOLS: int - PROCESSING: int - OK: int - CREATED: int - ACCEPTED: int - NON_AUTHORITATIVE_INFORMATION: int - NO_CONTENT: int - RESET_CONTENT: int - PARTIAL_CONTENT: int - MULTI_STATUS: int - ALREADY_REPORTED: int - IM_USED: int - MULTIPLE_CHOICES: int - MOVED_PERMANENTLY: int - FOUND: int - SEE_OTHER: int - NOT_MODIFIED: int - USE_PROXY: int - TEMPORARY_REDIRECT: int - PERMANENT_REDIRECT: int - BAD_REQUEST: int - UNAUTHORIZED: int - PAYMENT_REQUIRED: int - FORBIDDEN: int - NOT_FOUND: int - METHOD_NOT_ALLOWED: int - NOT_ACCEPTABLE: int - PROXY_AUTHENTICATION_REQUIRED: int - REQUEST_TIMEOUT: int - CONFLICT: int - GONE: int - LENGTH_REQUIRED: int - PRECONDITION_FAILED: int - REQUEST_ENTITY_TOO_LARGE: int - REQUEST_URI_TOO_LONG: int - UNSUPPORTED_MEDIA_TYPE: int - REQUESTED_RANGE_NOT_SATISFIABLE: int - EXPECTATION_FAILED: int - UNPROCESSABLE_ENTITY: int - LOCKED: int - FAILED_DEPENDENCY: int - UPGRADE_REQUIRED: int - PRECONDITION_REQUIRED: int - TOO_MANY_REQUESTS: int - REQUEST_HEADER_FIELDS_TOO_LARGE: int - INTERNAL_SERVER_ERROR: int - NOT_IMPLEMENTED: int - BAD_GATEWAY: int - SERVICE_UNAVAILABLE: int - GATEWAY_TIMEOUT: int - HTTP_VERSION_NOT_SUPPORTED: int - VARIANT_ALSO_NEGOTIATES: int - INSUFFICIENT_STORAGE: int - LOOP_DETECTED: int - NOT_EXTENDED: int - NETWORK_AUTHENTICATION_REQUIRED: int - MISDIRECTED_REQUEST: int - UNAVAILABLE_FOR_LEGAL_REASONS: int + CONTINUE = ... + SWITCHING_PROTOCOLS = ... + PROCESSING = ... + OK = ... + CREATED = ... + ACCEPTED = ... + NON_AUTHORITATIVE_INFORMATION = ... + NO_CONTENT = ... + RESET_CONTENT = ... + PARTIAL_CONTENT = ... + MULTI_STATUS = ... + ALREADY_REPORTED = ... + IM_USED = ... + MULTIPLE_CHOICES = ... + MOVED_PERMANENTLY = ... + FOUND = ... + SEE_OTHER = ... + NOT_MODIFIED = ... + USE_PROXY = ... + TEMPORARY_REDIRECT = ... + PERMANENT_REDIRECT = ... + BAD_REQUEST = ... + UNAUTHORIZED = ... + PAYMENT_REQUIRED = ... + FORBIDDEN = ... + NOT_FOUND = ... + METHOD_NOT_ALLOWED = ... + NOT_ACCEPTABLE = ... + PROXY_AUTHENTICATION_REQUIRED = ... + REQUEST_TIMEOUT = ... + CONFLICT = ... + GONE = ... + LENGTH_REQUIRED = ... + PRECONDITION_FAILED = ... + REQUEST_ENTITY_TOO_LARGE = ... + REQUEST_URI_TOO_LONG = ... + UNSUPPORTED_MEDIA_TYPE = ... + REQUESTED_RANGE_NOT_SATISFIABLE = ... + EXPECTATION_FAILED = ... + UNPROCESSABLE_ENTITY = ... + LOCKED = ... + FAILED_DEPENDENCY = ... + UPGRADE_REQUIRED = ... + PRECONDITION_REQUIRED = ... + TOO_MANY_REQUESTS = ... + REQUEST_HEADER_FIELDS_TOO_LARGE = ... + INTERNAL_SERVER_ERROR = ... + NOT_IMPLEMENTED = ... + BAD_GATEWAY = ... + SERVICE_UNAVAILABLE = ... + GATEWAY_TIMEOUT = ... + HTTP_VERSION_NOT_SUPPORTED = ... + VARIANT_ALSO_NEGOTIATES = ... + INSUFFICIENT_STORAGE = ... + LOOP_DETECTED = ... + NOT_EXTENDED = ... + NETWORK_AUTHENTICATION_REQUIRED = ... + MISDIRECTED_REQUEST = ... + UNAVAILABLE_FOR_LEGAL_REASONS = ... if sys.version_info >= (3, 9): EARLY_HINTS: Literal[103] IM_A_TEAPOT: Literal[418] @@ -94,12 +94,12 @@ if sys.version_info >= (3, 11): class HTTPMethod(StrEnum): @property def description(self) -> str: ... - CONNECT: str - DELETE: str - GET: str - HEAD: str - OPTIONS: str - PATCH: str - POST: str - PUT: str - TRACE: str + CONNECT = ... + DELETE = ... + GET = ... + HEAD = ... + OPTIONS = ... + PATCH = ... + POST = ... + PUT = ... + TRACE = ... diff --git a/stdlib/inspect.pyi b/stdlib/inspect.pyi index a26dc67f9945..696ba0efa891 100644 --- a/stdlib/inspect.pyi +++ b/stdlib/inspect.pyi @@ -347,11 +347,11 @@ if sys.version_info >= (3, 10): # The name is the same as the enum's name in CPython class _ParameterKind(enum.IntEnum): - POSITIONAL_ONLY: int - POSITIONAL_OR_KEYWORD: int - VAR_POSITIONAL: int - KEYWORD_ONLY: int - VAR_KEYWORD: int + POSITIONAL_ONLY = ... + POSITIONAL_OR_KEYWORD = ... + VAR_POSITIONAL = ... + KEYWORD_ONLY = ... + VAR_KEYWORD = ... @property def description(self) -> str: ... @@ -610,22 +610,22 @@ if sys.version_info >= (3, 9): if sys.version_info >= (3, 12): class BufferFlags(enum.IntFlag): - SIMPLE: int - WRITABLE: int - FORMAT: int - ND: int - STRIDES: int - C_CONTIGUOUS: int - F_CONTIGUOUS: int - ANY_CONTIGUOUS: int - INDIRECT: int - CONTIG: int - CONTIG_RO: int - STRIDED: int - STRIDED_RO: int - RECORDS: int - RECORDS_RO: int - FULL: int - FULL_RO: int - READ: int - WRITE: int + SIMPLE = ... + WRITABLE = ... + FORMAT = ... + ND = ... + STRIDES = ... + C_CONTIGUOUS = ... + F_CONTIGUOUS = ... + ANY_CONTIGUOUS = ... + INDIRECT = ... + CONTIG = ... + CONTIG_RO = ... + STRIDED = ... + STRIDED_RO = ... + RECORDS = ... + RECORDS_RO = ... + FULL = ... + FULL_RO = ... + READ = ... + WRITE = ... diff --git a/stdlib/plistlib.pyi b/stdlib/plistlib.pyi index f7912a784987..e842ba4ca436 100644 --- a/stdlib/plistlib.pyi +++ b/stdlib/plistlib.pyi @@ -11,8 +11,8 @@ if sys.version_info < (3, 9): __all__ += ["readPlist", "writePlist", "readPlistFromBytes", "writePlistToBytes", "Data"] class PlistFormat(Enum): - FMT_XML: int - FMT_BINARY: int + FMT_XML = ... + FMT_BINARY = ... FMT_XML = PlistFormat.FMT_XML FMT_BINARY = PlistFormat.FMT_BINARY diff --git a/stdlib/pstats.pyi b/stdlib/pstats.pyi index a6ffd54de005..49e0ffb84c3b 100644 --- a/stdlib/pstats.pyi +++ b/stdlib/pstats.pyi @@ -14,15 +14,15 @@ else: _Selector: TypeAlias = str | float | int class SortKey(StrEnum): - CALLS: str - CUMULATIVE: str - FILENAME: str - LINE: str - NAME: str - NFL: str - PCALLS: str - STDNAME: str - TIME: str + CALLS = ... + CUMULATIVE = ... + FILENAME = ... + LINE = ... + NAME = ... + NFL = ... + PCALLS = ... + STDNAME = ... + TIME = ... if sys.version_info >= (3, 9): from dataclasses import dataclass diff --git a/stdlib/py_compile.pyi b/stdlib/py_compile.pyi index 81561a202883..588f89fc1415 100644 --- a/stdlib/py_compile.pyi +++ b/stdlib/py_compile.pyi @@ -12,9 +12,9 @@ class PyCompileError(Exception): def __init__(self, exc_type: type[BaseException], exc_value: BaseException, file: str, msg: str = "") -> None: ... class PycInvalidationMode(enum.Enum): - TIMESTAMP: int - CHECKED_HASH: int - UNCHECKED_HASH: int + TIMESTAMP = ... + CHECKED_HASH = ... + UNCHECKED_HASH = ... def _get_default_invalidation_mode() -> PycInvalidationMode: ... def compile( diff --git a/stdlib/signal.pyi b/stdlib/signal.pyi index 910424c01c31..2c600367c5c1 100644 --- a/stdlib/signal.pyi +++ b/stdlib/signal.pyi @@ -9,57 +9,57 @@ from typing_extensions import Never, TypeAlias NSIG: int class Signals(IntEnum): - SIGABRT: int - SIGFPE: int - SIGILL: int - SIGINT: int - SIGSEGV: int - SIGTERM: int + SIGABRT = ... + SIGFPE = ... + SIGILL = ... + SIGINT = ... + SIGSEGV = ... + SIGTERM = ... if sys.platform == "win32": - SIGBREAK: int - CTRL_C_EVENT: int - CTRL_BREAK_EVENT: int + SIGBREAK = ... + CTRL_C_EVENT = ... + CTRL_BREAK_EVENT = ... else: - SIGALRM: int - SIGBUS: int - SIGCHLD: int - SIGCONT: int - SIGHUP: int - SIGIO: int - SIGIOT: int - SIGKILL: int - SIGPIPE: int - SIGPROF: int - SIGQUIT: int - SIGSTOP: int - SIGSYS: int - SIGTRAP: int - SIGTSTP: int - SIGTTIN: int - SIGTTOU: int - SIGURG: int - SIGUSR1: int - SIGUSR2: int - SIGVTALRM: int - SIGWINCH: int - SIGXCPU: int - SIGXFSZ: int + SIGALRM = ... + SIGBUS = ... + SIGCHLD = ... + SIGCONT = ... + SIGHUP = ... + SIGIO = ... + SIGIOT = ... + SIGKILL = ... + SIGPIPE = ... + SIGPROF = ... + SIGQUIT = ... + SIGSTOP = ... + SIGSYS = ... + SIGTRAP = ... + SIGTSTP = ... + SIGTTIN = ... + SIGTTOU = ... + SIGURG = ... + SIGUSR1 = ... + SIGUSR2 = ... + SIGVTALRM = ... + SIGWINCH = ... + SIGXCPU = ... + SIGXFSZ = ... if sys.platform != "linux": - SIGEMT: int - SIGINFO: int + SIGEMT = ... + SIGINFO = ... if sys.platform != "darwin": - SIGCLD: int - SIGPOLL: int - SIGPWR: int - SIGRTMAX: int - SIGRTMIN: int + SIGCLD = ... + SIGPOLL = ... + SIGPWR = ... + SIGRTMAX = ... + SIGRTMIN = ... if sys.version_info >= (3, 11): - SIGSTKFLT: int + SIGSTKFLT = ... class Handlers(IntEnum): - SIG_DFL: int - SIG_IGN: int + SIG_DFL = ... + SIG_IGN = ... SIG_DFL: Handlers SIG_IGN: Handlers @@ -123,9 +123,9 @@ else: ITIMER_VIRTUAL: int class Sigmasks(IntEnum): - SIG_BLOCK: int - SIG_UNBLOCK: int - SIG_SETMASK: int + SIG_BLOCK = ... + SIG_UNBLOCK = ... + SIG_SETMASK = ... SIG_BLOCK = Sigmasks.SIG_BLOCK SIG_UNBLOCK = Sigmasks.SIG_UNBLOCK SIG_SETMASK = Sigmasks.SIG_SETMASK diff --git a/stdlib/socket.pyi b/stdlib/socket.pyi index ce5e35228fe4..3b9ba6a67c78 100644 --- a/stdlib/socket.pyi +++ b/stdlib/socket.pyi @@ -480,51 +480,51 @@ EAGAIN: int EWOULDBLOCK: int class AddressFamily(IntEnum): - AF_INET: int - AF_INET6: int - AF_APPLETALK: int - AF_DECnet: int - AF_IPX: int - AF_SNA: int - AF_UNSPEC: int + AF_INET = ... + AF_INET6 = ... + AF_APPLETALK = ... + AF_DECnet = ... + AF_IPX = ... + AF_SNA = ... + AF_UNSPEC = ... if sys.platform != "darwin": - AF_IRDA: int + AF_IRDA = ... if sys.platform != "win32": - AF_ROUTE: int - AF_SYSTEM: int - AF_UNIX: int + AF_ROUTE = ... + AF_SYSTEM = ... + AF_UNIX = ... if sys.platform != "win32" and sys.platform != "darwin": - AF_AAL5: int - AF_ASH: int - AF_ATMPVC: int - AF_ATMSVC: int - AF_AX25: int - AF_BRIDGE: int - AF_ECONET: int - AF_KEY: int - AF_LLC: int - AF_NETBEUI: int - AF_NETROM: int - AF_PPPOX: int - AF_ROSE: int - AF_SECURITY: int - AF_WANPIPE: int - AF_X25: int + AF_AAL5 = ... + AF_ASH = ... + AF_ATMPVC = ... + AF_ATMSVC = ... + AF_AX25 = ... + AF_BRIDGE = ... + AF_ECONET = ... + AF_KEY = ... + AF_LLC = ... + AF_NETBEUI = ... + AF_NETROM = ... + AF_PPPOX = ... + AF_ROSE = ... + AF_SECURITY = ... + AF_WANPIPE = ... + AF_X25 = ... if sys.platform == "linux": - AF_CAN: int - AF_PACKET: int - AF_RDS: int - AF_TIPC: int - AF_ALG: int - AF_NETLINK: int - AF_VSOCK: int - AF_QIPCRTR: int + AF_CAN = ... + AF_PACKET = ... + AF_RDS = ... + AF_TIPC = ... + AF_ALG = ... + AF_NETLINK = ... + AF_VSOCK = ... + AF_QIPCRTR = ... if sys.platform != "win32" or sys.version_info >= (3, 9): - AF_LINK: int + AF_LINK = ... if sys.platform != "darwin": - AF_BLUETOOTH: int + AF_BLUETOOTH = ... if sys.platform == "win32" and sys.version_info >= (3, 12): - AF_HYPERV: int + AF_HYPERV = ... AF_INET = AddressFamily.AF_INET AF_INET6 = AddressFamily.AF_INET6 @@ -579,14 +579,14 @@ if sys.platform == "win32" and sys.version_info >= (3, 12): AF_HYPERV = AddressFamily.AF_HYPERV class SocketKind(IntEnum): - SOCK_STREAM: int - SOCK_DGRAM: int - SOCK_RAW: int - SOCK_RDM: int - SOCK_SEQPACKET: int + SOCK_STREAM = ... + SOCK_DGRAM = ... + SOCK_RAW = ... + SOCK_RDM = ... + SOCK_SEQPACKET = ... if sys.platform == "linux": - SOCK_CLOEXEC: int - SOCK_NONBLOCK: int + SOCK_CLOEXEC = ... + SOCK_NONBLOCK = ... SOCK_STREAM = SocketKind.SOCK_STREAM SOCK_DGRAM = SocketKind.SOCK_DGRAM @@ -598,32 +598,32 @@ if sys.platform == "linux": SOCK_NONBLOCK = SocketKind.SOCK_NONBLOCK class MsgFlag(IntFlag): - MSG_CTRUNC: int - MSG_DONTROUTE: int - MSG_OOB: int - MSG_PEEK: int - MSG_TRUNC: int - MSG_WAITALL: int + MSG_CTRUNC = ... + MSG_DONTROUTE = ... + MSG_OOB = ... + MSG_PEEK = ... + MSG_TRUNC = ... + MSG_WAITALL = ... if sys.platform != "darwin": - MSG_BCAST: int - MSG_MCAST: int - MSG_ERRQUEUE: int + MSG_BCAST = ... + MSG_MCAST = ... + MSG_ERRQUEUE = ... if sys.platform != "win32" and sys.platform != "darwin": - MSG_BTAG: int - MSG_CMSG_CLOEXEC: int - MSG_CONFIRM: int - MSG_ETAG: int - MSG_FASTOPEN: int - MSG_MORE: int - MSG_NOTIFICATION: int + MSG_BTAG = ... + MSG_CMSG_CLOEXEC = ... + MSG_CONFIRM = ... + MSG_ETAG = ... + MSG_FASTOPEN = ... + MSG_MORE = ... + MSG_NOTIFICATION = ... if sys.platform != "win32": - MSG_DONTWAIT: int - MSG_EOF: int - MSG_EOR: int - MSG_NOSIGNAL: int # sometimes this exists on darwin, sometimes not + MSG_DONTWAIT = ... + MSG_EOF = ... + MSG_EOR = ... + MSG_NOSIGNAL = ... # sometimes this exists on darwin, sometimes not MSG_CTRUNC = MsgFlag.MSG_CTRUNC MSG_DONTROUTE = MsgFlag.MSG_DONTROUTE @@ -653,17 +653,17 @@ if sys.platform != "win32" and sys.platform != "darwin": MSG_NOTIFICATION = MsgFlag.MSG_NOTIFICATION class AddressInfo(IntFlag): - AI_ADDRCONFIG: int - AI_ALL: int - AI_CANONNAME: int - AI_NUMERICHOST: int - AI_NUMERICSERV: int - AI_PASSIVE: int - AI_V4MAPPED: int + AI_ADDRCONFIG = ... + AI_ALL = ... + AI_CANONNAME = ... + AI_NUMERICHOST = ... + AI_NUMERICSERV = ... + AI_PASSIVE = ... + AI_V4MAPPED = ... if sys.platform != "win32": - AI_DEFAULT: int - AI_MASK: int - AI_V4MAPPED_CFG: int + AI_DEFAULT = ... + AI_MASK = ... + AI_V4MAPPED_CFG = ... AI_ADDRCONFIG = AddressInfo.AI_ADDRCONFIG AI_ALL = AddressInfo.AI_ALL diff --git a/stdlib/ssl.pyi b/stdlib/ssl.pyi index 583ac82750ac..05d2f2e87f1e 100644 --- a/stdlib/ssl.pyi +++ b/stdlib/ssl.pyi @@ -136,23 +136,23 @@ if sys.platform == "win32": def enum_crls(store_name: str) -> _EnumRetType: ... class VerifyMode(enum.IntEnum): - CERT_NONE: int - CERT_OPTIONAL: int - CERT_REQUIRED: int + CERT_NONE = ... + CERT_OPTIONAL = ... + CERT_REQUIRED = ... CERT_NONE: VerifyMode CERT_OPTIONAL: VerifyMode CERT_REQUIRED: VerifyMode class VerifyFlags(enum.IntFlag): - VERIFY_DEFAULT: int - VERIFY_CRL_CHECK_LEAF: int - VERIFY_CRL_CHECK_CHAIN: int - VERIFY_X509_STRICT: int - VERIFY_X509_TRUSTED_FIRST: int + VERIFY_DEFAULT = ... + VERIFY_CRL_CHECK_LEAF = ... + VERIFY_CRL_CHECK_CHAIN = ... + VERIFY_X509_STRICT = ... + VERIFY_X509_TRUSTED_FIRST = ... if sys.version_info >= (3, 10): - VERIFY_ALLOW_PROXY_CERTS: int - VERIFY_X509_PARTIAL_CHAIN: int + VERIFY_ALLOW_PROXY_CERTS = ... + VERIFY_X509_PARTIAL_CHAIN = ... VERIFY_DEFAULT: VerifyFlags VERIFY_CRL_CHECK_LEAF: VerifyFlags @@ -165,15 +165,15 @@ if sys.version_info >= (3, 10): VERIFY_X509_PARTIAL_CHAIN: VerifyFlags class _SSLMethod(enum.IntEnum): - PROTOCOL_SSLv23: int - PROTOCOL_SSLv2: int - PROTOCOL_SSLv3: int - PROTOCOL_TLSv1: int - PROTOCOL_TLSv1_1: int - PROTOCOL_TLSv1_2: int - PROTOCOL_TLS: int - PROTOCOL_TLS_CLIENT: int - PROTOCOL_TLS_SERVER: int + PROTOCOL_SSLv23 = ... + PROTOCOL_SSLv2 = ... + PROTOCOL_SSLv3 = ... + PROTOCOL_TLSv1 = ... + PROTOCOL_TLSv1_1 = ... + PROTOCOL_TLSv1_2 = ... + PROTOCOL_TLS = ... + PROTOCOL_TLS_CLIENT = ... + PROTOCOL_TLS_SERVER = ... PROTOCOL_SSLv23: _SSLMethod PROTOCOL_SSLv2: _SSLMethod @@ -186,25 +186,25 @@ PROTOCOL_TLS_CLIENT: _SSLMethod PROTOCOL_TLS_SERVER: _SSLMethod class Options(enum.IntFlag): - OP_ALL: int - OP_NO_SSLv2: int - OP_NO_SSLv3: int - OP_NO_TLSv1: int - OP_NO_TLSv1_1: int - OP_NO_TLSv1_2: int - OP_NO_TLSv1_3: int - OP_CIPHER_SERVER_PREFERENCE: int - OP_SINGLE_DH_USE: int - OP_SINGLE_ECDH_USE: int - OP_NO_COMPRESSION: int - OP_NO_TICKET: int - OP_NO_RENEGOTIATION: int - OP_ENABLE_MIDDLEBOX_COMPAT: int + OP_ALL = ... + OP_NO_SSLv2 = ... + OP_NO_SSLv3 = ... + OP_NO_TLSv1 = ... + OP_NO_TLSv1_1 = ... + OP_NO_TLSv1_2 = ... + OP_NO_TLSv1_3 = ... + OP_CIPHER_SERVER_PREFERENCE = ... + OP_SINGLE_DH_USE = ... + OP_SINGLE_ECDH_USE = ... + OP_NO_COMPRESSION = ... + OP_NO_TICKET = ... + OP_NO_RENEGOTIATION = ... + OP_ENABLE_MIDDLEBOX_COMPAT = ... if sys.version_info >= (3, 12): - OP_LEGACY_SERVER_CONNECT: int - OP_ENABLE_KTLS: int + OP_LEGACY_SERVER_CONNECT = ... + OP_ENABLE_KTLS = ... if sys.version_info >= (3, 11) or sys.platform == "linux": - OP_IGNORE_UNEXPECTED_EOF: int + OP_IGNORE_UNEXPECTED_EOF = ... OP_ALL: Options OP_NO_SSLv2: Options @@ -244,33 +244,33 @@ OPENSSL_VERSION_INFO: tuple[int, int, int, int, int] OPENSSL_VERSION_NUMBER: int class AlertDescription(enum.IntEnum): - ALERT_DESCRIPTION_ACCESS_DENIED: int - ALERT_DESCRIPTION_BAD_CERTIFICATE: int - ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE: int - ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE: int - ALERT_DESCRIPTION_BAD_RECORD_MAC: int - ALERT_DESCRIPTION_CERTIFICATE_EXPIRED: int - ALERT_DESCRIPTION_CERTIFICATE_REVOKED: int - ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN: int - ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE: int - ALERT_DESCRIPTION_CLOSE_NOTIFY: int - ALERT_DESCRIPTION_DECODE_ERROR: int - ALERT_DESCRIPTION_DECOMPRESSION_FAILURE: int - ALERT_DESCRIPTION_DECRYPT_ERROR: int - ALERT_DESCRIPTION_HANDSHAKE_FAILURE: int - ALERT_DESCRIPTION_ILLEGAL_PARAMETER: int - ALERT_DESCRIPTION_INSUFFICIENT_SECURITY: int - ALERT_DESCRIPTION_INTERNAL_ERROR: int - ALERT_DESCRIPTION_NO_RENEGOTIATION: int - ALERT_DESCRIPTION_PROTOCOL_VERSION: int - ALERT_DESCRIPTION_RECORD_OVERFLOW: int - ALERT_DESCRIPTION_UNEXPECTED_MESSAGE: int - ALERT_DESCRIPTION_UNKNOWN_CA: int - ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY: int - ALERT_DESCRIPTION_UNRECOGNIZED_NAME: int - ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE: int - ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION: int - ALERT_DESCRIPTION_USER_CANCELLED: int + ALERT_DESCRIPTION_ACCESS_DENIED = ... + ALERT_DESCRIPTION_BAD_CERTIFICATE = ... + ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE = ... + ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE = ... + ALERT_DESCRIPTION_BAD_RECORD_MAC = ... + ALERT_DESCRIPTION_CERTIFICATE_EXPIRED = ... + ALERT_DESCRIPTION_CERTIFICATE_REVOKED = ... + ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN = ... + ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE = ... + ALERT_DESCRIPTION_CLOSE_NOTIFY = ... + ALERT_DESCRIPTION_DECODE_ERROR = ... + ALERT_DESCRIPTION_DECOMPRESSION_FAILURE = ... + ALERT_DESCRIPTION_DECRYPT_ERROR = ... + ALERT_DESCRIPTION_HANDSHAKE_FAILURE = ... + ALERT_DESCRIPTION_ILLEGAL_PARAMETER = ... + ALERT_DESCRIPTION_INSUFFICIENT_SECURITY = ... + ALERT_DESCRIPTION_INTERNAL_ERROR = ... + ALERT_DESCRIPTION_NO_RENEGOTIATION = ... + ALERT_DESCRIPTION_PROTOCOL_VERSION = ... + ALERT_DESCRIPTION_RECORD_OVERFLOW = ... + ALERT_DESCRIPTION_UNEXPECTED_MESSAGE = ... + ALERT_DESCRIPTION_UNKNOWN_CA = ... + ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY = ... + ALERT_DESCRIPTION_UNRECOGNIZED_NAME = ... + ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE = ... + ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION = ... + ALERT_DESCRIPTION_USER_CANCELLED = ... ALERT_DESCRIPTION_HANDSHAKE_FAILURE: AlertDescription ALERT_DESCRIPTION_INTERNAL_ERROR: AlertDescription @@ -314,8 +314,8 @@ class _ASN1Object(_ASN1ObjectBase): def fromname(cls, name: str) -> Self: ... class Purpose(_ASN1Object, enum.Enum): - SERVER_AUTH: _ASN1Object - CLIENT_AUTH: _ASN1Object + SERVER_AUTH = ... + CLIENT_AUTH = ... class SSLSocket(socket.socket): context: SSLContext @@ -366,13 +366,13 @@ class SSLSocket(socket.socket): def sendmsg(self, *args: Never, **kwargs: Never) -> Never: ... # type: ignore[override] class TLSVersion(enum.IntEnum): - MINIMUM_SUPPORTED: int - MAXIMUM_SUPPORTED: int - SSLv3: int - TLSv1: int - TLSv1_1: int - TLSv1_2: int - TLSv1_3: int + MINIMUM_SUPPORTED = ... + MAXIMUM_SUPPORTED = ... + SSLv3 = ... + TLSv1 = ... + TLSv1_1 = ... + TLSv1_2 = ... + TLSv1_3 = ... class SSLContext: check_hostname: bool @@ -498,15 +498,15 @@ class SSLSession: def __eq__(self, __value: object) -> bool: ... class SSLErrorNumber(enum.IntEnum): - SSL_ERROR_EOF: int - SSL_ERROR_INVALID_ERROR_CODE: int - SSL_ERROR_SSL: int - SSL_ERROR_SYSCALL: int - SSL_ERROR_WANT_CONNECT: int - SSL_ERROR_WANT_READ: int - SSL_ERROR_WANT_WRITE: int - SSL_ERROR_WANT_X509_LOOKUP: int - SSL_ERROR_ZERO_RETURN: int + SSL_ERROR_EOF = ... + SSL_ERROR_INVALID_ERROR_CODE = ... + SSL_ERROR_SSL = ... + SSL_ERROR_SYSCALL = ... + SSL_ERROR_WANT_CONNECT = ... + SSL_ERROR_WANT_READ = ... + SSL_ERROR_WANT_WRITE = ... + SSL_ERROR_WANT_X509_LOOKUP = ... + SSL_ERROR_ZERO_RETURN = ... SSL_ERROR_EOF: SSLErrorNumber # undocumented SSL_ERROR_INVALID_ERROR_CODE: SSLErrorNumber # undocumented diff --git a/stdlib/tkinter/__init__.pyi b/stdlib/tkinter/__init__.pyi index ff876d0bb88c..9df109b10ada 100644 --- a/stdlib/tkinter/__init__.pyi +++ b/stdlib/tkinter/__init__.pyi @@ -195,45 +195,45 @@ if sys.version_info >= (3, 11): serial: int class EventType(StrEnum): - Activate: str - ButtonPress: str + Activate = ... + ButtonPress = ... Button = ButtonPress - ButtonRelease: str - Circulate: str - CirculateRequest: str - ClientMessage: str - Colormap: str - Configure: str - ConfigureRequest: str - Create: str - Deactivate: str - Destroy: str - Enter: str - Expose: str - FocusIn: str - FocusOut: str - GraphicsExpose: str - Gravity: str - KeyPress: str + ButtonRelease = ... + Circulate = ... + CirculateRequest = ... + ClientMessage = ... + Colormap = ... + Configure = ... + ConfigureRequest = ... + Create = ... + Deactivate = ... + Destroy = ... + Enter = ... + Expose = ... + FocusIn = ... + FocusOut = ... + GraphicsExpose = ... + Gravity = ... + KeyPress = ... Key = KeyPress - KeyRelease: str - Keymap: str - Leave: str - Map: str - MapRequest: str - Mapping: str - Motion: str - MouseWheel: str - NoExpose: str - Property: str - Reparent: str - ResizeRequest: str - Selection: str - SelectionClear: str - SelectionRequest: str - Unmap: str - VirtualEvent: str - Visibility: str + KeyRelease = ... + Keymap = ... + Leave = ... + Map = ... + MapRequest = ... + Mapping = ... + Motion = ... + MouseWheel = ... + NoExpose = ... + Property = ... + Reparent = ... + ResizeRequest = ... + Selection = ... + SelectionClear = ... + SelectionRequest = ... + Unmap = ... + VirtualEvent = ... + Visibility = ... _W = TypeVar("_W", bound=Misc) # Events considered covariant because you should never assign to event.widget. diff --git a/stdlib/uuid.pyi b/stdlib/uuid.pyi index e1ea424f9680..a7f38cc1876c 100644 --- a/stdlib/uuid.pyi +++ b/stdlib/uuid.pyi @@ -7,9 +7,9 @@ from typing_extensions import TypeAlias _FieldsType: TypeAlias = tuple[int, int, int, int, int, int] class SafeUUID(Enum): - safe: int - unsafe: int - unknown: None + safe = ... + unsafe = ... + unknown = None class UUID: def __init__( diff --git a/stubs/Pillow/PIL/BlpImagePlugin.pyi b/stubs/Pillow/PIL/BlpImagePlugin.pyi index eda4e0c6c86d..8b6e0d44aa7b 100644 --- a/stubs/Pillow/PIL/BlpImagePlugin.pyi +++ b/stubs/Pillow/PIL/BlpImagePlugin.pyi @@ -5,17 +5,17 @@ from typing import ClassVar, Literal from .ImageFile import ImageFile, PyDecoder, PyEncoder class Format(IntEnum): - JPEG: int + JPEG = ... class Encoding(IntEnum): - UNCOMPRESSED: int - DXT: int - UNCOMPRESSED_RAW_BGRA: int + UNCOMPRESSED = ... + DXT = ... + UNCOMPRESSED_RAW_BGRA = ... class AlphaEncoding(IntEnum): - DXT1: int - DXT3: int - DXT5: int + DXT1 = ... + DXT3 = ... + DXT5 = ... def unpack_565(i): ... def decode_dxt1(data, alpha: bool = False): ... diff --git a/stubs/Pillow/PIL/ExifTags.pyi b/stubs/Pillow/PIL/ExifTags.pyi index 4b75919f447d..1c633e99db78 100644 --- a/stubs/Pillow/PIL/ExifTags.pyi +++ b/stubs/Pillow/PIL/ExifTags.pyi @@ -2,346 +2,346 @@ from collections.abc import Mapping from enum import IntEnum class Base(IntEnum): - InteropIndex: int - ProcessingSoftware: int - NewSubfileType: int - SubfileType: int - ImageWidth: int - ImageLength: int - BitsPerSample: int - Compression: int - PhotometricInterpretation: int - Thresholding: int - CellWidth: int - CellLength: int - FillOrder: int - DocumentName: int - ImageDescription: int - Make: int - Model: int - StripOffsets: int - Orientation: int - SamplesPerPixel: int - RowsPerStrip: int - StripByteCounts: int - MinSampleValue: int - MaxSampleValue: int - XResolution: int - YResolution: int - PlanarConfiguration: int - PageName: int - FreeOffsets: int - FreeByteCounts: int - GrayResponseUnit: int - GrayResponseCurve: int - T4Options: int - T6Options: int - ResolutionUnit: int - PageNumber: int - TransferFunction: int - Software: int - DateTime: int - Artist: int - HostComputer: int - Predictor: int - WhitePoint: int - PrimaryChromaticities: int - ColorMap: int - HalftoneHints: int - TileWidth: int - TileLength: int - TileOffsets: int - TileByteCounts: int - SubIFDs: int - InkSet: int - InkNames: int - NumberOfInks: int - DotRange: int - TargetPrinter: int - ExtraSamples: int - SampleFormat: int - SMinSampleValue: int - SMaxSampleValue: int - TransferRange: int - ClipPath: int - XClipPathUnits: int - YClipPathUnits: int - Indexed: int - JPEGTables: int - OPIProxy: int - JPEGProc: int - JpegIFOffset: int - JpegIFByteCount: int - JpegRestartInterval: int - JpegLosslessPredictors: int - JpegPointTransforms: int - JpegQTables: int - JpegDCTables: int - JpegACTables: int - YCbCrCoefficients: int - YCbCrSubSampling: int - YCbCrPositioning: int - ReferenceBlackWhite: int - XMLPacket: int - RelatedImageFileFormat: int - RelatedImageWidth: int - RelatedImageLength: int - Rating: int - RatingPercent: int - ImageID: int - CFARepeatPatternDim: int - BatteryLevel: int - Copyright: int - ExposureTime: int - FNumber: int - IPTCNAA: int - ImageResources: int - ExifOffset: int - InterColorProfile: int - ExposureProgram: int - SpectralSensitivity: int - GPSInfo: int - ISOSpeedRatings: int - OECF: int - Interlace: int - TimeZoneOffset: int - SelfTimerMode: int - SensitivityType: int - StandardOutputSensitivity: int - RecommendedExposureIndex: int - ISOSpeed: int - ISOSpeedLatitudeyyy: int - ISOSpeedLatitudezzz: int - ExifVersion: int - DateTimeOriginal: int - DateTimeDigitized: int - OffsetTime: int - OffsetTimeOriginal: int - OffsetTimeDigitized: int - ComponentsConfiguration: int - CompressedBitsPerPixel: int - ShutterSpeedValue: int - ApertureValue: int - BrightnessValue: int - ExposureBiasValue: int - MaxApertureValue: int - SubjectDistance: int - MeteringMode: int - LightSource: int - Flash: int - FocalLength: int - Noise: int - ImageNumber: int - SecurityClassification: int - ImageHistory: int - TIFFEPStandardID: int - MakerNote: int - UserComment: int - SubsecTime: int - SubsecTimeOriginal: int - SubsecTimeDigitized: int - AmbientTemperature: int - Humidity: int - Pressure: int - WaterDepth: int - Acceleration: int - CameraElevationAngle: int - XPTitle: int - XPComment: int - XPAuthor: int - XPKeywords: int - XPSubject: int - FlashPixVersion: int - ColorSpace: int - ExifImageWidth: int - ExifImageHeight: int - RelatedSoundFile: int - ExifInteroperabilityOffset: int - FlashEnergy: int - SpatialFrequencyResponse: int - FocalPlaneXResolution: int - FocalPlaneYResolution: int - FocalPlaneResolutionUnit: int - SubjectLocation: int - ExposureIndex: int - SensingMethod: int - FileSource: int - SceneType: int - CFAPattern: int - CustomRendered: int - ExposureMode: int - WhiteBalance: int - DigitalZoomRatio: int - FocalLengthIn35mmFilm: int - SceneCaptureType: int - GainControl: int - Contrast: int - Saturation: int - Sharpness: int - DeviceSettingDescription: int - SubjectDistanceRange: int - ImageUniqueID: int - CameraOwnerName: int - BodySerialNumber: int - LensSpecification: int - LensMake: int - LensModel: int - LensSerialNumber: int - CompositeImage: int - CompositeImageCount: int - CompositeImageExposureTimes: int - Gamma: int - PrintImageMatching: int - DNGVersion: int - DNGBackwardVersion: int - UniqueCameraModel: int - LocalizedCameraModel: int - CFAPlaneColor: int - CFALayout: int - LinearizationTable: int - BlackLevelRepeatDim: int - BlackLevel: int - BlackLevelDeltaH: int - BlackLevelDeltaV: int - WhiteLevel: int - DefaultScale: int - DefaultCropOrigin: int - DefaultCropSize: int - ColorMatrix1: int - ColorMatrix2: int - CameraCalibration1: int - CameraCalibration2: int - ReductionMatrix1: int - ReductionMatrix2: int - AnalogBalance: int - AsShotNeutral: int - AsShotWhiteXY: int - BaselineExposure: int - BaselineNoise: int - BaselineSharpness: int - BayerGreenSplit: int - LinearResponseLimit: int - CameraSerialNumber: int - LensInfo: int - ChromaBlurRadius: int - AntiAliasStrength: int - ShadowScale: int - DNGPrivateData: int - MakerNoteSafety: int - CalibrationIlluminant1: int - CalibrationIlluminant2: int - BestQualityScale: int - RawDataUniqueID: int - OriginalRawFileName: int - OriginalRawFileData: int - ActiveArea: int - MaskedAreas: int - AsShotICCProfile: int - AsShotPreProfileMatrix: int - CurrentICCProfile: int - CurrentPreProfileMatrix: int - ColorimetricReference: int - CameraCalibrationSignature: int - ProfileCalibrationSignature: int - AsShotProfileName: int - NoiseReductionApplied: int - ProfileName: int - ProfileHueSatMapDims: int - ProfileHueSatMapData1: int - ProfileHueSatMapData2: int - ProfileToneCurve: int - ProfileEmbedPolicy: int - ProfileCopyright: int - ForwardMatrix1: int - ForwardMatrix2: int - PreviewApplicationName: int - PreviewApplicationVersion: int - PreviewSettingsName: int - PreviewSettingsDigest: int - PreviewColorSpace: int - PreviewDateTime: int - RawImageDigest: int - OriginalRawFileDigest: int - SubTileBlockSize: int - RowInterleaveFactor: int - ProfileLookTableDims: int - ProfileLookTableData: int - OpcodeList1: int - OpcodeList2: int - OpcodeList3: int - NoiseProfile: int + InteropIndex = ... + ProcessingSoftware = ... + NewSubfileType = ... + SubfileType = ... + ImageWidth = ... + ImageLength = ... + BitsPerSample = ... + Compression = ... + PhotometricInterpretation = ... + Thresholding = ... + CellWidth = ... + CellLength = ... + FillOrder = ... + DocumentName = ... + ImageDescription = ... + Make = ... + Model = ... + StripOffsets = ... + Orientation = ... + SamplesPerPixel = ... + RowsPerStrip = ... + StripByteCounts = ... + MinSampleValue = ... + MaxSampleValue = ... + XResolution = ... + YResolution = ... + PlanarConfiguration = ... + PageName = ... + FreeOffsets = ... + FreeByteCounts = ... + GrayResponseUnit = ... + GrayResponseCurve = ... + T4Options = ... + T6Options = ... + ResolutionUnit = ... + PageNumber = ... + TransferFunction = ... + Software = ... + DateTime = ... + Artist = ... + HostComputer = ... + Predictor = ... + WhitePoint = ... + PrimaryChromaticities = ... + ColorMap = ... + HalftoneHints = ... + TileWidth = ... + TileLength = ... + TileOffsets = ... + TileByteCounts = ... + SubIFDs = ... + InkSet = ... + InkNames = ... + NumberOfInks = ... + DotRange = ... + TargetPrinter = ... + ExtraSamples = ... + SampleFormat = ... + SMinSampleValue = ... + SMaxSampleValue = ... + TransferRange = ... + ClipPath = ... + XClipPathUnits = ... + YClipPathUnits = ... + Indexed = ... + JPEGTables = ... + OPIProxy = ... + JPEGProc = ... + JpegIFOffset = ... + JpegIFByteCount = ... + JpegRestartInterval = ... + JpegLosslessPredictors = ... + JpegPointTransforms = ... + JpegQTables = ... + JpegDCTables = ... + JpegACTables = ... + YCbCrCoefficients = ... + YCbCrSubSampling = ... + YCbCrPositioning = ... + ReferenceBlackWhite = ... + XMLPacket = ... + RelatedImageFileFormat = ... + RelatedImageWidth = ... + RelatedImageLength = ... + Rating = ... + RatingPercent = ... + ImageID = ... + CFARepeatPatternDim = ... + BatteryLevel = ... + Copyright = ... + ExposureTime = ... + FNumber = ... + IPTCNAA = ... + ImageResources = ... + ExifOffset = ... + InterColorProfile = ... + ExposureProgram = ... + SpectralSensitivity = ... + GPSInfo = ... + ISOSpeedRatings = ... + OECF = ... + Interlace = ... + TimeZoneOffset = ... + SelfTimerMode = ... + SensitivityType = ... + StandardOutputSensitivity = ... + RecommendedExposureIndex = ... + ISOSpeed = ... + ISOSpeedLatitudeyyy = ... + ISOSpeedLatitudezzz = ... + ExifVersion = ... + DateTimeOriginal = ... + DateTimeDigitized = ... + OffsetTime = ... + OffsetTimeOriginal = ... + OffsetTimeDigitized = ... + ComponentsConfiguration = ... + CompressedBitsPerPixel = ... + ShutterSpeedValue = ... + ApertureValue = ... + BrightnessValue = ... + ExposureBiasValue = ... + MaxApertureValue = ... + SubjectDistance = ... + MeteringMode = ... + LightSource = ... + Flash = ... + FocalLength = ... + Noise = ... + ImageNumber = ... + SecurityClassification = ... + ImageHistory = ... + TIFFEPStandardID = ... + MakerNote = ... + UserComment = ... + SubsecTime = ... + SubsecTimeOriginal = ... + SubsecTimeDigitized = ... + AmbientTemperature = ... + Humidity = ... + Pressure = ... + WaterDepth = ... + Acceleration = ... + CameraElevationAngle = ... + XPTitle = ... + XPComment = ... + XPAuthor = ... + XPKeywords = ... + XPSubject = ... + FlashPixVersion = ... + ColorSpace = ... + ExifImageWidth = ... + ExifImageHeight = ... + RelatedSoundFile = ... + ExifInteroperabilityOffset = ... + FlashEnergy = ... + SpatialFrequencyResponse = ... + FocalPlaneXResolution = ... + FocalPlaneYResolution = ... + FocalPlaneResolutionUnit = ... + SubjectLocation = ... + ExposureIndex = ... + SensingMethod = ... + FileSource = ... + SceneType = ... + CFAPattern = ... + CustomRendered = ... + ExposureMode = ... + WhiteBalance = ... + DigitalZoomRatio = ... + FocalLengthIn35mmFilm = ... + SceneCaptureType = ... + GainControl = ... + Contrast = ... + Saturation = ... + Sharpness = ... + DeviceSettingDescription = ... + SubjectDistanceRange = ... + ImageUniqueID = ... + CameraOwnerName = ... + BodySerialNumber = ... + LensSpecification = ... + LensMake = ... + LensModel = ... + LensSerialNumber = ... + CompositeImage = ... + CompositeImageCount = ... + CompositeImageExposureTimes = ... + Gamma = ... + PrintImageMatching = ... + DNGVersion = ... + DNGBackwardVersion = ... + UniqueCameraModel = ... + LocalizedCameraModel = ... + CFAPlaneColor = ... + CFALayout = ... + LinearizationTable = ... + BlackLevelRepeatDim = ... + BlackLevel = ... + BlackLevelDeltaH = ... + BlackLevelDeltaV = ... + WhiteLevel = ... + DefaultScale = ... + DefaultCropOrigin = ... + DefaultCropSize = ... + ColorMatrix1 = ... + ColorMatrix2 = ... + CameraCalibration1 = ... + CameraCalibration2 = ... + ReductionMatrix1 = ... + ReductionMatrix2 = ... + AnalogBalance = ... + AsShotNeutral = ... + AsShotWhiteXY = ... + BaselineExposure = ... + BaselineNoise = ... + BaselineSharpness = ... + BayerGreenSplit = ... + LinearResponseLimit = ... + CameraSerialNumber = ... + LensInfo = ... + ChromaBlurRadius = ... + AntiAliasStrength = ... + ShadowScale = ... + DNGPrivateData = ... + MakerNoteSafety = ... + CalibrationIlluminant1 = ... + CalibrationIlluminant2 = ... + BestQualityScale = ... + RawDataUniqueID = ... + OriginalRawFileName = ... + OriginalRawFileData = ... + ActiveArea = ... + MaskedAreas = ... + AsShotICCProfile = ... + AsShotPreProfileMatrix = ... + CurrentICCProfile = ... + CurrentPreProfileMatrix = ... + ColorimetricReference = ... + CameraCalibrationSignature = ... + ProfileCalibrationSignature = ... + AsShotProfileName = ... + NoiseReductionApplied = ... + ProfileName = ... + ProfileHueSatMapDims = ... + ProfileHueSatMapData1 = ... + ProfileHueSatMapData2 = ... + ProfileToneCurve = ... + ProfileEmbedPolicy = ... + ProfileCopyright = ... + ForwardMatrix1 = ... + ForwardMatrix2 = ... + PreviewApplicationName = ... + PreviewApplicationVersion = ... + PreviewSettingsName = ... + PreviewSettingsDigest = ... + PreviewColorSpace = ... + PreviewDateTime = ... + RawImageDigest = ... + OriginalRawFileDigest = ... + SubTileBlockSize = ... + RowInterleaveFactor = ... + ProfileLookTableDims = ... + ProfileLookTableData = ... + OpcodeList1 = ... + OpcodeList2 = ... + OpcodeList3 = ... + NoiseProfile = ... TAGS: Mapping[int, str] class GPS(IntEnum): - GPSVersionID: int - GPSLatitudeRef: int - GPSLatitude: int - GPSLongitudeRef: int - GPSLongitude: int - GPSAltitudeRef: int - GPSAltitude: int - GPSTimeStamp: int - GPSSatellites: int - GPSStatus: int - GPSMeasureMode: int - GPSDOP: int - GPSSpeedRef: int - GPSSpeed: int - GPSTrackRef: int - GPSTrack: int - GPSImgDirectionRef: int - GPSImgDirection: int - GPSMapDatum: int - GPSDestLatitudeRef: int - GPSDestLatitude: int - GPSDestLongitudeRef: int - GPSDestLongitude: int - GPSDestBearingRef: int - GPSDestBearing: int - GPSDestDistanceRef: int - GPSDestDistance: int - GPSProcessingMethod: int - GPSAreaInformation: int - GPSDateStamp: int - GPSDifferential: int - GPSHPositioningError: int + GPSVersionID = ... + GPSLatitudeRef = ... + GPSLatitude = ... + GPSLongitudeRef = ... + GPSLongitude = ... + GPSAltitudeRef = ... + GPSAltitude = ... + GPSTimeStamp = ... + GPSSatellites = ... + GPSStatus = ... + GPSMeasureMode = ... + GPSDOP = ... + GPSSpeedRef = ... + GPSSpeed = ... + GPSTrackRef = ... + GPSTrack = ... + GPSImgDirectionRef = ... + GPSImgDirection = ... + GPSMapDatum = ... + GPSDestLatitudeRef = ... + GPSDestLatitude = ... + GPSDestLongitudeRef = ... + GPSDestLongitude = ... + GPSDestBearingRef = ... + GPSDestBearing = ... + GPSDestDistanceRef = ... + GPSDestDistance = ... + GPSProcessingMethod = ... + GPSAreaInformation = ... + GPSDateStamp = ... + GPSDifferential = ... + GPSHPositioningError = ... GPSTAGS: Mapping[int, str] class Interop(IntEnum): - InteropIndex: int - InteropVersion: int - RelatedImageFileFormat: int - RelatedImageWidth: int - RleatedImageHeight: int + InteropIndex = ... + InteropVersion = ... + RelatedImageFileFormat = ... + RelatedImageWidth = ... + RleatedImageHeight = ... class IFD(IntEnum): - Exif: int - GPSInfo: int - Makernote: int - Interop: int - IFD1: int + Exif = ... + GPSInfo = ... + Makernote = ... + Interop = ... + IFD1 = ... class LightSource(IntEnum): - Unknown: int - Daylight: int - Fluorescent: int - Tungsten: int - Flash: int - Fine: int - Cloudy: int - Shade: int - DaylightFluorescent: int - DayWhiteFluorescent: int - CoolWhiteFluorescent: int - WhiteFluorescent: int - StandardLightA: int - StandardLightB: int - StandardLightC: int - D55: int - D65: int - D75: int - D50: int - ISO: int - Other: int + Unknown = ... + Daylight = ... + Fluorescent = ... + Tungsten = ... + Flash = ... + Fine = ... + Cloudy = ... + Shade = ... + DaylightFluorescent = ... + DayWhiteFluorescent = ... + CoolWhiteFluorescent = ... + WhiteFluorescent = ... + StandardLightA = ... + StandardLightB = ... + StandardLightC = ... + D55 = ... + D65 = ... + D75 = ... + D50 = ... + ISO = ... + Other = ... diff --git a/stubs/Pillow/PIL/FtexImagePlugin.pyi b/stubs/Pillow/PIL/FtexImagePlugin.pyi index 43601e143643..a38b4da80f5b 100644 --- a/stubs/Pillow/PIL/FtexImagePlugin.pyi +++ b/stubs/Pillow/PIL/FtexImagePlugin.pyi @@ -6,8 +6,8 @@ from .ImageFile import ImageFile MAGIC: bytes class Format(IntEnum): - DXT1: int - UNCOMPRESSED: int + DXT1 = ... + UNCOMPRESSED = ... class FtexImageFile(ImageFile): format: ClassVar[Literal["FTEX"]] diff --git a/stubs/Pillow/PIL/Image.pyi b/stubs/Pillow/PIL/Image.pyi index f42ca955478b..5c529c662f28 100644 --- a/stubs/Pillow/PIL/Image.pyi +++ b/stubs/Pillow/PIL/Image.pyi @@ -51,13 +51,13 @@ USE_CFFI_ACCESS: bool def isImageType(t: object) -> TypeGuard[Image]: ... class Transpose(IntEnum): - FLIP_LEFT_RIGHT: Literal[0] - FLIP_TOP_BOTTOM: Literal[1] - ROTATE_90: Literal[2] - ROTATE_180: Literal[3] - ROTATE_270: Literal[4] - TRANSPOSE: Literal[5] - TRANSVERSE: Literal[6] + FLIP_LEFT_RIGHT = 0 + FLIP_TOP_BOTTOM = 1 + ROTATE_90 = 2 + ROTATE_180 = 3 + ROTATE_270 = 4 + TRANSPOSE = 5 + TRANSVERSE = 6 # All Transpose items FLIP_LEFT_RIGHT: Literal[0] @@ -69,11 +69,11 @@ TRANSPOSE: Literal[5] TRANSVERSE: Literal[6] class Transform(IntEnum): - AFFINE: Literal[0] - EXTENT: Literal[1] - PERSPECTIVE: Literal[2] - QUAD: Literal[3] - MESH: Literal[4] + AFFINE = 0 + EXTENT = 1 + PERSPECTIVE = 2 + QUAD = 3 + MESH = 4 # All Transform items AFFINE: Literal[0] @@ -83,12 +83,12 @@ QUAD: Literal[3] MESH: Literal[4] class Resampling(IntEnum): - NEAREST: Literal[0] - LANCZOS: Literal[1] - BILINEAR: Literal[2] - BICUBIC: Literal[3] - BOX: Literal[4] - HAMMING: Literal[5] + NEAREST = 0 + LANCZOS = 1 + BILINEAR = 2 + BICUBIC = 3 + BOX = 4 + HAMMING = 5 # All Resampling items NEAREST: Literal[0] @@ -99,10 +99,10 @@ BOX: Literal[4] HAMMING: Literal[5] class Dither(IntEnum): - NONE: Literal[0] - ORDERED: Literal[1] - RASTERIZE: Literal[2] - FLOYDSTEINBERG: Literal[3] + NONE = 0 + ORDERED = 1 + RASTERIZE = 2 + FLOYDSTEINBERG = 3 # All Dither items NONE: Literal[0] @@ -111,18 +111,18 @@ RASTERIZE: Literal[2] FLOYDSTEINBERG: Literal[3] class Palette(IntEnum): - WEB: Literal[0] - ADAPTIVE: Literal[1] + WEB = 0 + ADAPTIVE = 1 # All Palette items WEB: Literal[0] ADAPTIVE: Literal[1] class Quantize(IntEnum): - MEDIANCUT: Literal[0] - MAXCOVERAGE: Literal[1] - FASTOCTREE: Literal[2] - LIBIMAGEQUANT: Literal[3] + MEDIANCUT = 0 + MAXCOVERAGE = 1 + FASTOCTREE = 2 + LIBIMAGEQUANT = 3 # All Quantize items MEDIANCUT: Literal[0] diff --git a/stubs/Pillow/PIL/ImageCms.pyi b/stubs/Pillow/PIL/ImageCms.pyi index 6eb7101c4bd3..bbeeb1a2169a 100644 --- a/stubs/Pillow/PIL/ImageCms.pyi +++ b/stubs/Pillow/PIL/ImageCms.pyi @@ -9,15 +9,15 @@ VERSION: str core: Incomplete class Intent(IntEnum): - PERCEPTUAL: int - RELATIVE_COLORIMETRIC: int - SATURATION: int - ABSOLUTE_COLORIMETRIC: int + PERCEPTUAL = ... + RELATIVE_COLORIMETRIC = ... + SATURATION = ... + ABSOLUTE_COLORIMETRIC = ... class Direction(IntEnum): - INPUT: int - OUTPUT: int - PROOF: int + INPUT = ... + OUTPUT = ... + PROOF = ... FLAGS: Incomplete diff --git a/stubs/Pillow/PIL/ImageFont.pyi b/stubs/Pillow/PIL/ImageFont.pyi index 2dd4008b7712..32721715eb8c 100644 --- a/stubs/Pillow/PIL/ImageFont.pyi +++ b/stubs/Pillow/PIL/ImageFont.pyi @@ -6,8 +6,8 @@ from typing import Final, Literal, Protocol from PIL.Image import Transpose class Layout(IntEnum): - BASIC: Literal[0] - RAQM: Literal[1] + BASIC = 0 + RAQM = 1 MAX_STRING_LENGTH: Final[int] = 1_000_000 diff --git a/stubs/Pillow/PIL/PngImagePlugin.pyi b/stubs/Pillow/PIL/PngImagePlugin.pyi index b510a259348b..64355393da20 100644 --- a/stubs/Pillow/PIL/PngImagePlugin.pyi +++ b/stubs/Pillow/PIL/PngImagePlugin.pyi @@ -10,13 +10,13 @@ MAX_TEXT_CHUNK: Incomplete MAX_TEXT_MEMORY: Incomplete class Disposal(IntEnum): - OP_NONE: int - OP_BACKGROUND: int - OP_PREVIOUS: int + OP_NONE = ... + OP_BACKGROUND = ... + OP_PREVIOUS = ... class Blend(IntEnum): - OP_SOURCE: int - OP_OVER: int + OP_SOURCE = ... + OP_OVER = ... class ChunkStream: fp: Incomplete diff --git a/stubs/aws-xray-sdk/aws_xray_sdk/core/sampling/reservoir.pyi b/stubs/aws-xray-sdk/aws_xray_sdk/core/sampling/reservoir.pyi index 322d1d38c3d8..f45f7e057d69 100644 --- a/stubs/aws-xray-sdk/aws_xray_sdk/core/sampling/reservoir.pyi +++ b/stubs/aws-xray-sdk/aws_xray_sdk/core/sampling/reservoir.pyi @@ -10,6 +10,6 @@ class Reservoir: def TTL(self): ... class ReservoirDecision(Enum): - TAKE: str - BORROW: str - NO: str + TAKE = ... + BORROW = ... + NO = ... diff --git a/stubs/fpdf2/fpdf/enums.pyi b/stubs/fpdf2/fpdf/enums.pyi index f67ea17e0af1..242c34ea34c7 100644 --- a/stubs/fpdf2/fpdf/enums.pyi +++ b/stubs/fpdf2/fpdf/enums.pyi @@ -5,8 +5,8 @@ from typing_extensions import Self from .syntax import Name class SignatureFlag(IntEnum): - SIGNATURES_EXIST: int - APPEND_ONLY: int + SIGNATURES_EXIST = ... + APPEND_ONLY = ... class CoerciveEnum(Enum): @classmethod @@ -21,62 +21,62 @@ class CoerciveIntFlag(IntFlag): def coerce(cls, value: Self | str | int) -> Self: ... class WrapMode(CoerciveEnum): - WORD: str - CHAR: str + WORD = ... + CHAR = ... class CharVPos(CoerciveEnum): - SUP: str - SUB: str - NOM: str - DENOM: str - LINE: str + SUP = ... + SUB = ... + NOM = ... + DENOM = ... + LINE = ... class Align(CoerciveEnum): - C: str - X: str - L: str - R: str - J: str + C = ... + X = ... + L = ... + R = ... + J = ... class VAlign(CoerciveEnum): - M: str - T: str - B: str + M = ... + T = ... + B = ... class TextEmphasis(CoerciveIntFlag): - B: int - I: int - U: int + B = ... + I = ... + U = ... @property def style(self) -> str: ... class MethodReturnValue(CoerciveIntFlag): - PAGE_BREAK: int - LINES: int - HEIGHT: int + PAGE_BREAK = ... + LINES = ... + HEIGHT = ... class TableBordersLayout(CoerciveEnum): - ALL: str - NONE: str - INTERNAL: str - MINIMAL: str - HORIZONTAL_LINES: str - NO_HORIZONTAL_LINES: str - SINGLE_TOP_LINE: str + ALL = ... + NONE = ... + INTERNAL = ... + MINIMAL = ... + HORIZONTAL_LINES = ... + NO_HORIZONTAL_LINES = ... + SINGLE_TOP_LINE = ... class TableCellFillMode(CoerciveEnum): - NONE: str - ALL: str - ROWS: str - COLUMNS: str + NONE = ... + ALL = ... + ROWS = ... + COLUMNS = ... def should_fill_cell(self, i: int, j: int) -> bool: ... class RenderStyle(CoerciveEnum): - D: str - F: str - DF: str + D = ... + F = ... + DF = ... @property def operator(self) -> str: ... @property @@ -85,173 +85,173 @@ class RenderStyle(CoerciveEnum): def is_fill(self) -> bool: ... class TextMode(CoerciveIntEnum): - FILL: int - STROKE: int - FILL_STROKE: int - INVISIBLE: int - FILL_CLIP: int - STROKE_CLIP: int - FILL_STROKE_CLIP: int - CLIP: int + FILL = ... + STROKE = ... + FILL_STROKE = ... + INVISIBLE = ... + FILL_CLIP = ... + STROKE_CLIP = ... + FILL_STROKE_CLIP = ... + CLIP = ... class XPos(CoerciveEnum): - LEFT: str - RIGHT: str - START: str - END: str - WCONT: str - CENTER: str - LMARGIN: str - RMARGIN: str + LEFT = ... + RIGHT = ... + START = ... + END = ... + WCONT = ... + CENTER = ... + LMARGIN = ... + RMARGIN = ... class YPos(CoerciveEnum): - TOP: str - LAST: str - NEXT: str - TMARGIN: str - BMARGIN: str + TOP = ... + LAST = ... + NEXT = ... + TMARGIN = ... + BMARGIN = ... class Angle(CoerciveIntEnum): - NORTH: int - EAST: int - SOUTH: int - WEST: int - NORTHEAST: int - SOUTHEAST: int - SOUTHWEST: int - NORTHWEST: int + NORTH = ... + EAST = ... + SOUTH = ... + WEST = ... + NORTHEAST = ... + SOUTHEAST = ... + SOUTHWEST = ... + NORTHWEST = ... class PageLayout(CoerciveEnum): - SINGLE_PAGE: Name - ONE_COLUMN: Name - TWO_COLUMN_LEFT: Name - TWO_COLUMN_RIGHT: Name - TWO_PAGE_LEFT: Name - TWO_PAGE_RIGHT: Name + SINGLE_PAGE = ... + ONE_COLUMN = ... + TWO_COLUMN_LEFT = ... + TWO_COLUMN_RIGHT = ... + TWO_PAGE_LEFT = ... + TWO_PAGE_RIGHT = ... class PageMode(CoerciveEnum): - USE_NONE: Name - USE_OUTLINES: Name - USE_THUMBS: Name - FULL_SCREEN: Name - USE_OC: Name - USE_ATTACHMENTS: Name + USE_NONE = ... + USE_OUTLINES = ... + USE_THUMBS = ... + FULL_SCREEN = ... + USE_OC = ... + USE_ATTACHMENTS = ... class TextMarkupType(CoerciveEnum): - HIGHLIGHT: Name - UNDERLINE: Name - SQUIGGLY: Name - STRIKE_OUT: Name + HIGHLIGHT = ... + UNDERLINE = ... + SQUIGGLY = ... + STRIKE_OUT = ... class BlendMode(CoerciveEnum): - NORMAL: Name - MULTIPLY: Name - SCREEN: Name - OVERLAY: Name - DARKEN: Name - LIGHTEN: Name - COLOR_DODGE: Name - COLOR_BURN: Name - HARD_LIGHT: Name - SOFT_LIGHT: Name - DIFFERENCE: Name - EXCLUSION: Name - HUE: Name - SATURATION: Name - COLOR: Name - LUMINOSITY: Name + NORMAL = ... + MULTIPLY = ... + SCREEN = ... + OVERLAY = ... + DARKEN = ... + LIGHTEN = ... + COLOR_DODGE = ... + COLOR_BURN = ... + HARD_LIGHT = ... + SOFT_LIGHT = ... + DIFFERENCE = ... + EXCLUSION = ... + HUE = ... + SATURATION = ... + COLOR = ... + LUMINOSITY = ... class AnnotationFlag(CoerciveIntEnum): - INVISIBLE: int - HIDDEN: int - PRINT: int - NO_ZOOM: int - NO_ROTATE: int - NO_VIEW: int - READ_ONLY: int - LOCKED: int - TOGGLE_NO_VIEW: int - LOCKED_CONTENTS: int + INVISIBLE = ... + HIDDEN = ... + PRINT = ... + NO_ZOOM = ... + NO_ROTATE = ... + NO_VIEW = ... + READ_ONLY = ... + LOCKED = ... + TOGGLE_NO_VIEW = ... + LOCKED_CONTENTS = ... class AnnotationName(CoerciveEnum): - NOTE: Name - COMMENT: Name - HELP: Name - PARAGRAPH: Name - NEW_PARAGRAPH: Name - INSERT: Name + NOTE = ... + COMMENT = ... + HELP = ... + PARAGRAPH = ... + NEW_PARAGRAPH = ... + INSERT = ... class FileAttachmentAnnotationName(CoerciveEnum): - PUSH_PIN: Name - GRAPH_PUSH_PIN: Name - PAPERCLIP_TAG: Name + PUSH_PIN = ... + GRAPH_PUSH_PIN = ... + PAPERCLIP_TAG = ... class IntersectionRule(CoerciveEnum): - NONZERO: str - EVENODD: str + NONZERO = ... + EVENODD = ... class PathPaintRule(CoerciveEnum): - STROKE: str - FILL_NONZERO: str - FILL_EVENODD: str - STROKE_FILL_NONZERO: str - STROKE_FILL_EVENODD: str - DONT_PAINT: str - AUTO: str + STROKE = ... + FILL_NONZERO = ... + FILL_EVENODD = ... + STROKE_FILL_NONZERO = ... + STROKE_FILL_EVENODD = ... + DONT_PAINT = ... + AUTO = ... class ClippingPathIntersectionRule(CoerciveEnum): - NONZERO: str - EVENODD: str + NONZERO = ... + EVENODD = ... class StrokeCapStyle(CoerciveIntEnum): - BUTT: int - ROUND: int - SQUARE: int + BUTT = ... + ROUND = ... + SQUARE = ... class StrokeJoinStyle(CoerciveIntEnum): - MITER: int - ROUND: int - BEVEL: int + MITER = ... + ROUND = ... + BEVEL = ... class PDFStyleKeys(Enum): - FILL_ALPHA: Name - BLEND_MODE: Name - STROKE_ALPHA: Name - STROKE_ADJUSTMENT: Name - STROKE_WIDTH: Name - STROKE_CAP_STYLE: Name - STROKE_JOIN_STYLE: Name - STROKE_MITER_LIMIT: Name - STROKE_DASH_PATTERN: Name + FILL_ALPHA = ... + BLEND_MODE = ... + STROKE_ALPHA = ... + STROKE_ADJUSTMENT = ... + STROKE_WIDTH = ... + STROKE_CAP_STYLE = ... + STROKE_JOIN_STYLE = ... + STROKE_MITER_LIMIT = ... + STROKE_DASH_PATTERN = ... class Corner(CoerciveEnum): - TOP_RIGHT: str - TOP_LEFT: str - BOTTOM_RIGHT: str - BOTTOM_LEFT: str + TOP_RIGHT = ... + TOP_LEFT = ... + BOTTOM_RIGHT = ... + BOTTOM_LEFT = ... class FontDescriptorFlags(Flag): - FIXED_PITCH: int - SYMBOLIC: int - ITALIC: int - FORCE_BOLD: int + FIXED_PITCH = ... + SYMBOLIC = ... + ITALIC = ... + FORCE_BOLD = ... class AccessPermission(IntFlag): - PRINT_LOW_RES: int - MODIFY: int - COPY: int - ANNOTATION: int - FILL_FORMS: int - COPY_FOR_ACCESSIBILITY: int - ASSEMBLE: int - PRINT_HIGH_RES: int + PRINT_LOW_RES = ... + MODIFY = ... + COPY = ... + ANNOTATION = ... + FILL_FORMS = ... + COPY_FOR_ACCESSIBILITY = ... + ASSEMBLE = ... + PRINT_HIGH_RES = ... @classmethod def all(cls) -> int: ... @classmethod def none(cls) -> Literal[0]: ... class EncryptionMethod(Enum): - NO_ENCRYPTION: int - RC4: int - AES_128: int - AES_256: int + NO_ENCRYPTION = ... + RC4 = ... + AES_128 = ... + AES_256 = ... diff --git a/stubs/influxdb-client/influxdb_client/client/flux_csv_parser.pyi b/stubs/influxdb-client/influxdb_client/client/flux_csv_parser.pyi index 9e3d15f9bceb..14846279c1bd 100644 --- a/stubs/influxdb-client/influxdb_client/client/flux_csv_parser.pyi +++ b/stubs/influxdb-client/influxdb_client/client/flux_csv_parser.pyi @@ -19,13 +19,13 @@ class FluxQueryException(Exception): class FluxCsvParserException(Exception): ... class FluxSerializationMode(Enum): - tables: int - stream: int - dataFrame: int + tables = ... + stream = ... + dataFrame = ... class FluxResponseMetadataMode(Enum): - full: int - only_names: int + full = ... + only_names = ... class _FluxCsvParserMetadata: table_index: int diff --git a/stubs/influxdb-client/influxdb_client/client/write_api.pyi b/stubs/influxdb-client/influxdb_client/client/write_api.pyi index 85bf6addef3a..69ed9a83a764 100644 --- a/stubs/influxdb-client/influxdb_client/client/write_api.pyi +++ b/stubs/influxdb-client/influxdb_client/client/write_api.pyi @@ -17,9 +17,9 @@ _Observable: TypeAlias = Any # reactivex.Observable logger: logging.Logger class WriteType(Enum): - batching: int - asynchronous: int - synchronous: int + batching = ... + asynchronous = ... + synchronous = ... class WriteOptions: write_type: WriteType diff --git a/stubs/pika/pika/delivery_mode.pyi b/stubs/pika/pika/delivery_mode.pyi index 8395e41294a1..0896ecc5ebe9 100644 --- a/stubs/pika/pika/delivery_mode.pyi +++ b/stubs/pika/pika/delivery_mode.pyi @@ -1,5 +1,5 @@ from enum import Enum class DeliveryMode(Enum): - Transient: int - Persistent: int + Transient = ... + Persistent = ... diff --git a/stubs/pika/pika/exchange_type.pyi b/stubs/pika/pika/exchange_type.pyi index 73cbf3686454..c149d114ac0c 100644 --- a/stubs/pika/pika/exchange_type.pyi +++ b/stubs/pika/pika/exchange_type.pyi @@ -1,7 +1,7 @@ from enum import Enum class ExchangeType(Enum): - direct: str - fanout: str - headers: str - topic: str + direct = ... + fanout = ... + headers = ... + topic = ... diff --git a/stubs/psutil/psutil/_common.pyi b/stubs/psutil/psutil/_common.pyi index 771525faba86..7e846cf985cc 100644 --- a/stubs/psutil/psutil/_common.pyi +++ b/stubs/psutil/psutil/_common.pyi @@ -48,16 +48,16 @@ NIC_DUPLEX_HALF: int NIC_DUPLEX_UNKNOWN: int class NicDuplex(enum.IntEnum): - NIC_DUPLEX_FULL: int - NIC_DUPLEX_HALF: int - NIC_DUPLEX_UNKNOWN: int + NIC_DUPLEX_FULL = ... + NIC_DUPLEX_HALF = ... + NIC_DUPLEX_UNKNOWN = ... POWER_TIME_UNKNOWN: int POWER_TIME_UNLIMITED: int class BatteryTime(enum.IntEnum): - POWER_TIME_UNKNOWN: int - POWER_TIME_UNLIMITED: int + POWER_TIME_UNKNOWN = ... + POWER_TIME_UNLIMITED = ... ENCODING: str ENCODING_ERRS: str diff --git a/stubs/psutil/psutil/_pslinux.pyi b/stubs/psutil/psutil/_pslinux.pyi index dacd14206953..8e3893ad6753 100644 --- a/stubs/psutil/psutil/_pslinux.pyi +++ b/stubs/psutil/psutil/_pslinux.pyi @@ -36,10 +36,10 @@ IOPRIO_CLASS_BE: int IOPRIO_CLASS_IDLE: int class IOPriority(enum.IntEnum): - IOPRIO_CLASS_NONE: int - IOPRIO_CLASS_RT: int - IOPRIO_CLASS_BE: int - IOPRIO_CLASS_IDLE: int + IOPRIO_CLASS_NONE = ... + IOPRIO_CLASS_RT = ... + IOPRIO_CLASS_BE = ... + IOPRIO_CLASS_IDLE = ... PROC_STATUSES: Any TCP_STATUSES: Any diff --git a/stubs/psutil/psutil/_pswindows.pyi b/stubs/psutil/psutil/_pswindows.pyi index da4b7f78f845..a817f61f816d 100644 --- a/stubs/psutil/psutil/_pswindows.pyi +++ b/stubs/psutil/psutil/_pswindows.pyi @@ -36,12 +36,12 @@ AddressFamily: Any TCP_STATUSES: Any class Priority(enum.IntEnum): - ABOVE_NORMAL_PRIORITY_CLASS: Any - BELOW_NORMAL_PRIORITY_CLASS: Any - HIGH_PRIORITY_CLASS: Any - IDLE_PRIORITY_CLASS: Any - NORMAL_PRIORITY_CLASS: Any - REALTIME_PRIORITY_CLASS: Any + ABOVE_NORMAL_PRIORITY_CLASS = ... + BELOW_NORMAL_PRIORITY_CLASS = ... + HIGH_PRIORITY_CLASS = ... + IDLE_PRIORITY_CLASS = ... + NORMAL_PRIORITY_CLASS = ... + REALTIME_PRIORITY_CLASS = ... IOPRIO_VERYLOW: int IOPRIO_LOW: int @@ -49,10 +49,10 @@ IOPRIO_NORMAL: int IOPRIO_HIGH: int class IOPriority(enum.IntEnum): - IOPRIO_VERYLOW: int - IOPRIO_LOW: int - IOPRIO_NORMAL: int - IOPRIO_HIGH: int + IOPRIO_VERYLOW = ... + IOPRIO_LOW = ... + IOPRIO_NORMAL = ... + IOPRIO_HIGH = ... pinfo_map: Any diff --git a/stubs/pynput/pynput/keyboard/_base.pyi b/stubs/pynput/pynput/keyboard/_base.pyi index 692af81ef482..f233b50e2239 100644 --- a/stubs/pynput/pynput/keyboard/_base.pyi +++ b/stubs/pynput/pynput/keyboard/_base.pyi @@ -25,71 +25,71 @@ class KeyCode: def from_dead(cls, char: str, **kwargs: Any) -> Self: ... class Key(enum.Enum): - alt: int - alt_l: int - alt_r: int - alt_gr: int - backspace: int - caps_lock: int - cmd: int - cmd_l: int - cmd_r: int - ctrl: int - ctrl_l: int - ctrl_r: int - delete: int - down: int - end: int - enter: int - esc: int - f1: int - f2: int - f3: int - f4: int - f5: int - f6: int - f7: int - f8: int - f9: int - f10: int - f11: int - f12: int - f13: int - f14: int - f15: int - f16: int - f17: int - f18: int - f19: int - f20: int + alt = ... + alt_l = ... + alt_r = ... + alt_gr = ... + backspace = ... + caps_lock = ... + cmd = ... + cmd_l = ... + cmd_r = ... + ctrl = ... + ctrl_l = ... + ctrl_r = ... + delete = ... + down = ... + end = ... + enter = ... + esc = ... + f1 = ... + f2 = ... + f3 = ... + f4 = ... + f5 = ... + f6 = ... + f7 = ... + f8 = ... + f9 = ... + f10 = ... + f11 = ... + f12 = ... + f13 = ... + f14 = ... + f15 = ... + f16 = ... + f17 = ... + f18 = ... + f19 = ... + f20 = ... if sys.platform == "win32": - f21: int - f22: int - f23: int - f24: int - home: int - left: int - page_down: int - page_up: int - right: int - shift: int - shift_l: int - shift_r: int - space: int - tab: int - up: int - media_play_pause: int - media_volume_mute: int - media_volume_down: int - media_volume_up: int - media_previous: int - media_next: int - insert: int - menu: int - num_lock: int - pause: int - print_screen: int - scroll_lock: int + f21 = ... + f22 = ... + f23 = ... + f24 = ... + home = ... + left = ... + page_down = ... + page_up = ... + right = ... + shift = ... + shift_l = ... + shift_r = ... + space = ... + tab = ... + up = ... + media_play_pause = ... + media_volume_mute = ... + media_volume_down = ... + media_volume_up = ... + media_previous = ... + media_next = ... + insert = ... + menu = ... + num_lock = ... + pause = ... + print_screen = ... + scroll_lock = ... class Controller: _KeyCode: ClassVar[type[KeyCode]] # undocumented diff --git a/stubs/pynput/pynput/mouse/_base.pyi b/stubs/pynput/pynput/mouse/_base.pyi index 10141121b1d7..0848b34d5264 100644 --- a/stubs/pynput/pynput/mouse/_base.pyi +++ b/stubs/pynput/pynput/mouse/_base.pyi @@ -8,41 +8,41 @@ from typing_extensions import Self from pynput._util import AbstractListener class Button(enum.Enum): - unknown: int - left: int - middle: int - right: int + unknown = ... + left = ... + middle = ... + right = ... if sys.platform == "linux": - button8: int - button9: int - button10: int - button11: int - button12: int - button13: int - button14: int - button15: int - button16: int - button17: int - button18: int - button19: int - button20: int - button21: int - button22: int - button23: int - button24: int - button25: int - button26: int - button27: int - button28: int - button29: int - button30: int - scroll_down: int - scroll_left: int - scroll_right: int - scroll_up: int + button8 = ... + button9 = ... + button10 = ... + button11 = ... + button12 = ... + button13 = ... + button14 = ... + button15 = ... + button16 = ... + button17 = ... + button18 = ... + button19 = ... + button20 = ... + button21 = ... + button22 = ... + button23 = ... + button24 = ... + button25 = ... + button26 = ... + button27 = ... + button28 = ... + button29 = ... + button30 = ... + scroll_down = ... + scroll_left = ... + scroll_right = ... + scroll_up = ... if sys.platform == "win32": - x1: int - x2: int + x1 = ... + x2 = ... class Controller: def __init__(self) -> None: ... diff --git a/stubs/redis/redis/asyncio/connection.pyi b/stubs/redis/redis/asyncio/connection.pyi index 988cb36110da..ab05867ed686 100644 --- a/stubs/redis/redis/asyncio/connection.pyi +++ b/stubs/redis/redis/asyncio/connection.pyi @@ -21,7 +21,7 @@ SYM_EMPTY: bytes SERVER_CLOSED_CONNECTION_ERROR: str class _Sentinel(enum.Enum): - sentinel: Any + sentinel = ... SENTINEL: Any MODULE_LOAD_ERROR: str diff --git a/stubs/regex/regex/_regex_core.pyi b/stubs/regex/regex/_regex_core.pyi index e5ab3f970920..e1b4ec971fab 100644 --- a/stubs/regex/regex/_regex_core.pyi +++ b/stubs/regex/regex/_regex_core.pyi @@ -9,40 +9,40 @@ class error(Exception): def __init__(self, message: str, pattern: AnyStr | None = None, pos: int | None = None) -> None: ... class RegexFlag(enum.IntFlag): - A: int - ASCII: int - B: int - BESTMATCH: int - D: int - DEBUG: int - E: int - ENHANCEMATCH: int - F: int - FULLCASE: int - I: int - IGNORECASE: int - L: int - LOCALE: int - M: int - MULTILINE: int - P: int - POSIX: int - R: int - REVERSE: int - T: int - TEMPLATE: int - S: int - DOTALL: int - U: int - UNICODE: int - V0: int - VERSION0: int - V1: int - VERSION1: int - W: int - WORD: int - X: int - VERBOSE: int + A = ... + ASCII = ... + B = ... + BESTMATCH = ... + D = ... + DEBUG = ... + E = ... + ENHANCEMATCH = ... + F = ... + FULLCASE = ... + I = ... + IGNORECASE = ... + L = ... + LOCALE = ... + M = ... + MULTILINE = ... + P = ... + POSIX = ... + R = ... + REVERSE = ... + T = ... + TEMPLATE = ... + S = ... + DOTALL = ... + U = ... + UNICODE = ... + V0 = ... + VERSION0 = ... + V1 = ... + VERSION1 = ... + W = ... + WORD = ... + X = ... + VERBOSE = ... A: int ASCII: int diff --git a/stubs/setuptools/setuptools/command/editable_wheel.pyi b/stubs/setuptools/setuptools/command/editable_wheel.pyi index 4f527d24aacb..198f16c5507f 100644 --- a/stubs/setuptools/setuptools/command/editable_wheel.pyi +++ b/stubs/setuptools/setuptools/command/editable_wheel.pyi @@ -14,9 +14,9 @@ _WheelFile: TypeAlias = Incomplete _Path: TypeAlias = str | Path class _EditableMode(Enum): - STRICT: str - LENIENT: str - COMPAT: str + STRICT = ... + LENIENT = ... + COMPAT = ... @classmethod def convert(cls, mode: str | None) -> _EditableMode: ... From 2c63836fe2430b3d980b6e26000da4b3ad973cd2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 00:51:12 +0000 Subject: [PATCH 02/30] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stubs/fpdf2/fpdf/enums.pyi | 2 -- 1 file changed, 2 deletions(-) diff --git a/stubs/fpdf2/fpdf/enums.pyi b/stubs/fpdf2/fpdf/enums.pyi index 242c34ea34c7..6e61a8c5dfc9 100644 --- a/stubs/fpdf2/fpdf/enums.pyi +++ b/stubs/fpdf2/fpdf/enums.pyi @@ -2,8 +2,6 @@ from enum import Enum, Flag, IntEnum, IntFlag from typing import Literal from typing_extensions import Self -from .syntax import Name - class SignatureFlag(IntEnum): SIGNATURES_EXIST = ... APPEND_ONLY = ... From ce2f1ba00e8539bc6acd5a6f02494ba623a6571b Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sun, 21 Jan 2024 19:27:08 -0800 Subject: [PATCH 03/30] Fixed some of the problems stubtest found. --- stdlib/asyncio/constants.pyi | 6 +- stdlib/http/__init__.pyi | 118 +++++++++++++-------------- stdlib/inspect.pyi | 10 +-- stdlib/plistlib.pyi | 4 +- stdlib/pstats.pyi | 18 ++-- stdlib/py_compile.pyi | 6 +- stdlib/signal.pyi | 92 ++++++++++----------- stdlib/socket.pyi | 122 +++++++++++++-------------- stdlib/ssl.pyi | 154 +++++++++++++++++------------------ stdlib/tkinter/__init__.pyi | 76 ++++++++--------- stdlib/uuid.pyi | 4 +- 11 files changed, 305 insertions(+), 305 deletions(-) diff --git a/stdlib/asyncio/constants.pyi b/stdlib/asyncio/constants.pyi index 6bfe2f2789f0..7759a2844953 100644 --- a/stdlib/asyncio/constants.pyi +++ b/stdlib/asyncio/constants.pyi @@ -15,6 +15,6 @@ if sys.version_info >= (3, 12): THREAD_JOIN_TIMEOUT: Literal[300] class _SendfileMode(enum.Enum): - UNSUPPORTED = ... - TRY_NATIVE = ... - FALLBACK = ... + UNSUPPORTED = 1 + TRY_NATIVE = 2 + FALLBACK = 3 diff --git a/stdlib/http/__init__.pyi b/stdlib/http/__init__.pyi index b4ec9ae252a1..3396dab81a7d 100644 --- a/stdlib/http/__init__.pyi +++ b/stdlib/http/__init__.pyi @@ -15,65 +15,65 @@ class HTTPStatus(IntEnum): def phrase(self) -> str: ... @property def description(self) -> str: ... - CONTINUE = ... - SWITCHING_PROTOCOLS = ... - PROCESSING = ... - OK = ... - CREATED = ... - ACCEPTED = ... - NON_AUTHORITATIVE_INFORMATION = ... - NO_CONTENT = ... - RESET_CONTENT = ... - PARTIAL_CONTENT = ... - MULTI_STATUS = ... - ALREADY_REPORTED = ... - IM_USED = ... - MULTIPLE_CHOICES = ... - MOVED_PERMANENTLY = ... - FOUND = ... - SEE_OTHER = ... - NOT_MODIFIED = ... - USE_PROXY = ... - TEMPORARY_REDIRECT = ... - PERMANENT_REDIRECT = ... - BAD_REQUEST = ... - UNAUTHORIZED = ... - PAYMENT_REQUIRED = ... - FORBIDDEN = ... - NOT_FOUND = ... - METHOD_NOT_ALLOWED = ... - NOT_ACCEPTABLE = ... - PROXY_AUTHENTICATION_REQUIRED = ... - REQUEST_TIMEOUT = ... - CONFLICT = ... - GONE = ... - LENGTH_REQUIRED = ... - PRECONDITION_FAILED = ... - REQUEST_ENTITY_TOO_LARGE = ... - REQUEST_URI_TOO_LONG = ... - UNSUPPORTED_MEDIA_TYPE = ... - REQUESTED_RANGE_NOT_SATISFIABLE = ... - EXPECTATION_FAILED = ... - UNPROCESSABLE_ENTITY = ... - LOCKED = ... - FAILED_DEPENDENCY = ... - UPGRADE_REQUIRED = ... - PRECONDITION_REQUIRED = ... - TOO_MANY_REQUESTS = ... - REQUEST_HEADER_FIELDS_TOO_LARGE = ... - INTERNAL_SERVER_ERROR = ... - NOT_IMPLEMENTED = ... - BAD_GATEWAY = ... - SERVICE_UNAVAILABLE = ... - GATEWAY_TIMEOUT = ... - HTTP_VERSION_NOT_SUPPORTED = ... - VARIANT_ALSO_NEGOTIATES = ... - INSUFFICIENT_STORAGE = ... - LOOP_DETECTED = ... - NOT_EXTENDED = ... - NETWORK_AUTHENTICATION_REQUIRED = ... - MISDIRECTED_REQUEST = ... - UNAVAILABLE_FOR_LEGAL_REASONS = ... + CONTINUE = 100 + SWITCHING_PROTOCOLS = 101 + PROCESSING = 102 + OK = 200 + CREATED = 201 + ACCEPTED = 202 + NON_AUTHORITATIVE_INFORMATION = 203 + NO_CONTENT = 204 + RESET_CONTENT = 205 + PARTIAL_CONTENT = 206 + MULTI_STATUS = 207 + ALREADY_REPORTED = 208 + IM_USED = 226 + MULTIPLE_CHOICES = 300 + MOVED_PERMANENTLY = 301 + FOUND = 302 + SEE_OTHER = 303 + NOT_MODIFIED = 304 + USE_PROXY = 305 + TEMPORARY_REDIRECT = 307 + PERMANENT_REDIRECT = 308 + BAD_REQUEST = 400 + UNAUTHORIZED = 401 + PAYMENT_REQUIRED = 402 + FORBIDDEN = 403 + NOT_FOUND = 404 + METHOD_NOT_ALLOWED = 405 + NOT_ACCEPTABLE = 406 + PROXY_AUTHENTICATION_REQUIRED = 407 + REQUEST_TIMEOUT = 408 + CONFLICT = 409 + GONE = 410 + LENGTH_REQUIRED = 411 + PRECONDITION_FAILED = 412 + REQUEST_ENTITY_TOO_LARGE = 413 + REQUEST_URI_TOO_LONG = 414 + UNSUPPORTED_MEDIA_TYPE = 415 + REQUESTED_RANGE_NOT_SATISFIABLE = 416 + EXPECTATION_FAILED = 417 + UNPROCESSABLE_ENTITY = 422 + LOCKED = 423 + FAILED_DEPENDENCY = 424 + UPGRADE_REQUIRED = 426 + PRECONDITION_REQUIRED = 428 + TOO_MANY_REQUESTS = 429 + REQUEST_HEADER_FIELDS_TOO_LARGE = 431 + INTERNAL_SERVER_ERROR = 500 + NOT_IMPLEMENTED = 501 + BAD_GATEWAY = 502 + SERVICE_UNAVAILABLE = 503 + GATEWAY_TIMEOUT = 504 + HTTP_VERSION_NOT_SUPPORTED = 505 + VARIANT_ALSO_NEGOTIATES = 506 + INSUFFICIENT_STORAGE = 507 + LOOP_DETECTED = 508 + NOT_EXTENDED = 510 + NETWORK_AUTHENTICATION_REQUIRED = 511 + MISDIRECTED_REQUEST = 421 + UNAVAILABLE_FOR_LEGAL_REASONS = 451 if sys.version_info >= (3, 9): EARLY_HINTS: Literal[103] IM_A_TEAPOT: Literal[418] diff --git a/stdlib/inspect.pyi b/stdlib/inspect.pyi index 696ba0efa891..0f6fe7784641 100644 --- a/stdlib/inspect.pyi +++ b/stdlib/inspect.pyi @@ -347,11 +347,11 @@ if sys.version_info >= (3, 10): # The name is the same as the enum's name in CPython class _ParameterKind(enum.IntEnum): - POSITIONAL_ONLY = ... - POSITIONAL_OR_KEYWORD = ... - VAR_POSITIONAL = ... - KEYWORD_ONLY = ... - VAR_KEYWORD = ... + POSITIONAL_ONLY = 0 + POSITIONAL_OR_KEYWORD = 1 + VAR_POSITIONAL = 2 + KEYWORD_ONLY = 3 + VAR_KEYWORD = 4 @property def description(self) -> str: ... diff --git a/stdlib/plistlib.pyi b/stdlib/plistlib.pyi index e842ba4ca436..09637673ce21 100644 --- a/stdlib/plistlib.pyi +++ b/stdlib/plistlib.pyi @@ -11,8 +11,8 @@ if sys.version_info < (3, 9): __all__ += ["readPlist", "writePlist", "readPlistFromBytes", "writePlistToBytes", "Data"] class PlistFormat(Enum): - FMT_XML = ... - FMT_BINARY = ... + FMT_XML = 1 + FMT_BINARY = 2 FMT_XML = PlistFormat.FMT_XML FMT_BINARY = PlistFormat.FMT_BINARY diff --git a/stdlib/pstats.pyi b/stdlib/pstats.pyi index 49e0ffb84c3b..20dd59d8753f 100644 --- a/stdlib/pstats.pyi +++ b/stdlib/pstats.pyi @@ -14,15 +14,15 @@ else: _Selector: TypeAlias = str | float | int class SortKey(StrEnum): - CALLS = ... - CUMULATIVE = ... - FILENAME = ... - LINE = ... - NAME = ... - NFL = ... - PCALLS = ... - STDNAME = ... - TIME = ... + CALLS = 'calls' + CUMULATIVE = 'cumulative' + FILENAME = 'filename' + LINE = 'line' + NAME = 'name' + NFL = 'nfl' + PCALLS = 'pcalls' + STDNAME = 'stdname' + TIME = 'time' if sys.version_info >= (3, 9): from dataclasses import dataclass diff --git a/stdlib/py_compile.pyi b/stdlib/py_compile.pyi index 588f89fc1415..334ce79b5dd0 100644 --- a/stdlib/py_compile.pyi +++ b/stdlib/py_compile.pyi @@ -12,9 +12,9 @@ class PyCompileError(Exception): def __init__(self, exc_type: type[BaseException], exc_value: BaseException, file: str, msg: str = "") -> None: ... class PycInvalidationMode(enum.Enum): - TIMESTAMP = ... - CHECKED_HASH = ... - UNCHECKED_HASH = ... + TIMESTAMP = 1 + CHECKED_HASH = 2 + UNCHECKED_HASH = 3 def _get_default_invalidation_mode() -> PycInvalidationMode: ... def compile( diff --git a/stdlib/signal.pyi b/stdlib/signal.pyi index 2c600367c5c1..a8756acd1f1b 100644 --- a/stdlib/signal.pyi +++ b/stdlib/signal.pyi @@ -9,57 +9,57 @@ from typing_extensions import Never, TypeAlias NSIG: int class Signals(IntEnum): - SIGABRT = ... - SIGFPE = ... - SIGILL = ... - SIGINT = ... - SIGSEGV = ... - SIGTERM = ... + SIGABRT = 6 + SIGFPE = 8 + SIGILL = 4 + SIGINT = 2 + SIGSEGV = 11 + SIGTERM = 15 if sys.platform == "win32": - SIGBREAK = ... - CTRL_C_EVENT = ... - CTRL_BREAK_EVENT = ... + SIGBREAK = 21 + CTRL_C_EVENT = 0 + CTRL_BREAK_EVENT = 1 else: - SIGALRM = ... - SIGBUS = ... - SIGCHLD = ... - SIGCONT = ... - SIGHUP = ... - SIGIO = ... - SIGIOT = ... - SIGKILL = ... - SIGPIPE = ... - SIGPROF = ... - SIGQUIT = ... - SIGSTOP = ... - SIGSYS = ... - SIGTRAP = ... - SIGTSTP = ... - SIGTTIN = ... - SIGTTOU = ... - SIGURG = ... - SIGUSR1 = ... - SIGUSR2 = ... - SIGVTALRM = ... - SIGWINCH = ... - SIGXCPU = ... - SIGXFSZ = ... + SIGALRM = 14 + SIGBUS = 7 + SIGCHLD = 17 + SIGCONT = 18 + SIGHUP = 1 + SIGIO = 29 + SIGIOT = 6 + SIGKILL = 9 + SIGPIPE = 13 + SIGPROF = 27 + SIGQUIT = 3 + SIGSTOP = 19 + SIGSYS = 31 + SIGTRAP = 5 + SIGTSTP = 20 + SIGTTIN = 21 + SIGTTOU = 22 + SIGURG = 23 + SIGUSR1 = 10 + SIGUSR2 = 12 + SIGVTALRM = 26 + SIGWINCH = 28 + SIGXCPU = 24 + SIGXFSZ = 25 if sys.platform != "linux": - SIGEMT = ... - SIGINFO = ... + SIGEMT = 7 + SIGINFO = 29 if sys.platform != "darwin": - SIGCLD = ... - SIGPOLL = ... - SIGPWR = ... - SIGRTMAX = ... - SIGRTMIN = ... + SIGCLD = 17 + SIGPOLL = 29 + SIGPWR = 30 + SIGRTMAX = 64 + SIGRTMIN = 34 if sys.version_info >= (3, 11): - SIGSTKFLT = ... + SIGSTKFLT = 16 class Handlers(IntEnum): - SIG_DFL = ... - SIG_IGN = ... + SIG_DFL = 0 + SIG_IGN = 1 SIG_DFL: Handlers SIG_IGN: Handlers @@ -123,9 +123,9 @@ else: ITIMER_VIRTUAL: int class Sigmasks(IntEnum): - SIG_BLOCK = ... - SIG_UNBLOCK = ... - SIG_SETMASK = ... + SIG_BLOCK = 0 + SIG_UNBLOCK = 1 + SIG_SETMASK = 2 SIG_BLOCK = Sigmasks.SIG_BLOCK SIG_UNBLOCK = Sigmasks.SIG_UNBLOCK SIG_SETMASK = Sigmasks.SIG_SETMASK diff --git a/stdlib/socket.pyi b/stdlib/socket.pyi index 3b9ba6a67c78..7db42b854978 100644 --- a/stdlib/socket.pyi +++ b/stdlib/socket.pyi @@ -480,45 +480,45 @@ EAGAIN: int EWOULDBLOCK: int class AddressFamily(IntEnum): - AF_INET = ... - AF_INET6 = ... - AF_APPLETALK = ... + AF_INET = 2 + AF_INET6 = 10 + AF_APPLETALK = 5 AF_DECnet = ... - AF_IPX = ... - AF_SNA = ... - AF_UNSPEC = ... + AF_IPX = 4 + AF_SNA = 22 + AF_UNSPEC = 0 if sys.platform != "darwin": - AF_IRDA = ... + AF_IRDA = 23 if sys.platform != "win32": - AF_ROUTE = ... - AF_SYSTEM = ... - AF_UNIX = ... + AF_ROUTE = 16 + AF_SYSTEM = 32 + AF_UNIX = 1 if sys.platform != "win32" and sys.platform != "darwin": AF_AAL5 = ... - AF_ASH = ... - AF_ATMPVC = ... - AF_ATMSVC = ... - AF_AX25 = ... - AF_BRIDGE = ... - AF_ECONET = ... - AF_KEY = ... - AF_LLC = ... - AF_NETBEUI = ... - AF_NETROM = ... - AF_PPPOX = ... - AF_ROSE = ... - AF_SECURITY = ... - AF_WANPIPE = ... - AF_X25 = ... + AF_ASH = 18 + AF_ATMPVC = 8 + AF_ATMSVC = 20 + AF_AX25 = 3 + AF_BRIDGE = 7 + AF_ECONET = 19 + AF_KEY = 15 + AF_LLC = 26 + AF_NETBEUI = 13 + AF_NETROM = 6 + AF_PPPOX = 24 + AF_ROSE = 11 + AF_SECURITY = 14 + AF_WANPIPE = 25 + AF_X25 = 9 if sys.platform == "linux": - AF_CAN = ... - AF_PACKET = ... - AF_RDS = ... - AF_TIPC = ... - AF_ALG = ... - AF_NETLINK = ... - AF_VSOCK = ... - AF_QIPCRTR = ... + AF_CAN = 29 + AF_PACKET = 17 + AF_RDS = 21 + AF_TIPC = 30 + AF_ALG = 38 + AF_NETLINK = 16 + AF_VSOCK = 40 + AF_QIPCRTR = 42 if sys.platform != "win32" or sys.version_info >= (3, 9): AF_LINK = ... if sys.platform != "darwin": @@ -579,14 +579,14 @@ if sys.platform == "win32" and sys.version_info >= (3, 12): AF_HYPERV = AddressFamily.AF_HYPERV class SocketKind(IntEnum): - SOCK_STREAM = ... - SOCK_DGRAM = ... - SOCK_RAW = ... - SOCK_RDM = ... - SOCK_SEQPACKET = ... + SOCK_STREAM = 1 + SOCK_DGRAM = 2 + SOCK_RAW = 3 + SOCK_RDM = 4 + SOCK_SEQPACKET = 5 if sys.platform == "linux": - SOCK_CLOEXEC = ... - SOCK_NONBLOCK = ... + SOCK_CLOEXEC = 524288 + SOCK_NONBLOCK = 2048 SOCK_STREAM = SocketKind.SOCK_STREAM SOCK_DGRAM = SocketKind.SOCK_DGRAM @@ -598,32 +598,32 @@ if sys.platform == "linux": SOCK_NONBLOCK = SocketKind.SOCK_NONBLOCK class MsgFlag(IntFlag): - MSG_CTRUNC = ... - MSG_DONTROUTE = ... - MSG_OOB = ... - MSG_PEEK = ... - MSG_TRUNC = ... - MSG_WAITALL = ... + MSG_CTRUNC = 8 + MSG_DONTROUTE = 4 + MSG_OOB = 1 + MSG_PEEK = 2 + MSG_TRUNC = 32 + MSG_WAITALL = 256 if sys.platform != "darwin": MSG_BCAST = ... MSG_MCAST = ... - MSG_ERRQUEUE = ... + MSG_ERRQUEUE = 8192 if sys.platform != "win32" and sys.platform != "darwin": MSG_BTAG = ... - MSG_CMSG_CLOEXEC = ... - MSG_CONFIRM = ... + MSG_CMSG_CLOEXEC = 1073741821 + MSG_CONFIRM = 2048 MSG_ETAG = ... - MSG_FASTOPEN = ... - MSG_MORE = ... + MSG_FASTOPEN = 536870912 + MSG_MORE = 32768 MSG_NOTIFICATION = ... if sys.platform != "win32": - MSG_DONTWAIT = ... + MSG_DONTWAIT = 64 MSG_EOF = ... - MSG_EOR = ... - MSG_NOSIGNAL = ... # sometimes this exists on darwin, sometimes not + MSG_EOR = 128 + MSG_NOSIGNAL = 16384 # sometimes this exists on darwin, sometimes not MSG_CTRUNC = MsgFlag.MSG_CTRUNC MSG_DONTROUTE = MsgFlag.MSG_DONTROUTE @@ -653,13 +653,13 @@ if sys.platform != "win32" and sys.platform != "darwin": MSG_NOTIFICATION = MsgFlag.MSG_NOTIFICATION class AddressInfo(IntFlag): - AI_ADDRCONFIG = ... - AI_ALL = ... - AI_CANONNAME = ... - AI_NUMERICHOST = ... - AI_NUMERICSERV = ... - AI_PASSIVE = ... - AI_V4MAPPED = ... + AI_ADDRCONFIG = 32 + AI_ALL = 16 + AI_CANONNAME = 2 + AI_NUMERICHOST = 4 + AI_NUMERICSERV = 1024 + AI_PASSIVE = 1 + AI_V4MAPPED = 8 if sys.platform != "win32": AI_DEFAULT = ... AI_MASK = ... diff --git a/stdlib/ssl.pyi b/stdlib/ssl.pyi index 05d2f2e87f1e..2f0295c68269 100644 --- a/stdlib/ssl.pyi +++ b/stdlib/ssl.pyi @@ -136,23 +136,23 @@ if sys.platform == "win32": def enum_crls(store_name: str) -> _EnumRetType: ... class VerifyMode(enum.IntEnum): - CERT_NONE = ... - CERT_OPTIONAL = ... - CERT_REQUIRED = ... + CERT_NONE = 0 + CERT_OPTIONAL = 1 + CERT_REQUIRED = 2 CERT_NONE: VerifyMode CERT_OPTIONAL: VerifyMode CERT_REQUIRED: VerifyMode class VerifyFlags(enum.IntFlag): - VERIFY_DEFAULT = ... - VERIFY_CRL_CHECK_LEAF = ... - VERIFY_CRL_CHECK_CHAIN = ... - VERIFY_X509_STRICT = ... - VERIFY_X509_TRUSTED_FIRST = ... + VERIFY_DEFAULT = 0 + VERIFY_CRL_CHECK_LEAF = 4 + VERIFY_CRL_CHECK_CHAIN = 12 + VERIFY_X509_STRICT = 32 + VERIFY_X509_TRUSTED_FIRST = 32768 if sys.version_info >= (3, 10): - VERIFY_ALLOW_PROXY_CERTS = ... - VERIFY_X509_PARTIAL_CHAIN = ... + VERIFY_ALLOW_PROXY_CERTS = 64 + VERIFY_X509_PARTIAL_CHAIN = 524288 VERIFY_DEFAULT: VerifyFlags VERIFY_CRL_CHECK_LEAF: VerifyFlags @@ -165,15 +165,15 @@ if sys.version_info >= (3, 10): VERIFY_X509_PARTIAL_CHAIN: VerifyFlags class _SSLMethod(enum.IntEnum): - PROTOCOL_SSLv23 = ... + PROTOCOL_SSLv23 = 2 PROTOCOL_SSLv2 = ... PROTOCOL_SSLv3 = ... - PROTOCOL_TLSv1 = ... - PROTOCOL_TLSv1_1 = ... - PROTOCOL_TLSv1_2 = ... - PROTOCOL_TLS = ... - PROTOCOL_TLS_CLIENT = ... - PROTOCOL_TLS_SERVER = ... + PROTOCOL_TLSv1 = 3 + PROTOCOL_TLSv1_1 = 4 + PROTOCOL_TLSv1_2 = 5 + PROTOCOL_TLS = 2 + PROTOCOL_TLS_CLIENT = 16 + PROTOCOL_TLS_SERVER = 17 PROTOCOL_SSLv23: _SSLMethod PROTOCOL_SSLv2: _SSLMethod @@ -186,25 +186,25 @@ PROTOCOL_TLS_CLIENT: _SSLMethod PROTOCOL_TLS_SERVER: _SSLMethod class Options(enum.IntFlag): - OP_ALL = ... - OP_NO_SSLv2 = ... - OP_NO_SSLv3 = ... - OP_NO_TLSv1 = ... - OP_NO_TLSv1_1 = ... - OP_NO_TLSv1_2 = ... - OP_NO_TLSv1_3 = ... - OP_CIPHER_SERVER_PREFERENCE = ... - OP_SINGLE_DH_USE = ... - OP_SINGLE_ECDH_USE = ... - OP_NO_COMPRESSION = ... - OP_NO_TICKET = ... - OP_NO_RENEGOTIATION = ... - OP_ENABLE_MIDDLEBOX_COMPAT = ... + OP_ALL = 2147483728 + OP_NO_SSLv2 = 0 + OP_NO_SSLv3 = 33554432 + OP_NO_TLSv1 = 67108864 + OP_NO_TLSv1_1 = 268435456 + OP_NO_TLSv1_2 = 134217728 + OP_NO_TLSv1_3 = 536870912 + OP_CIPHER_SERVER_PREFERENCE = 4194304 + OP_SINGLE_DH_USE = 0 + OP_SINGLE_ECDH_USE = 0 + OP_NO_COMPRESSION = 131072 + OP_NO_TICKET = 16384 + OP_NO_RENEGOTIATION = 1073741824 + OP_ENABLE_MIDDLEBOX_COMPAT = 1048576 if sys.version_info >= (3, 12): - OP_LEGACY_SERVER_CONNECT = ... - OP_ENABLE_KTLS = ... + OP_LEGACY_SERVER_CONNECT = 4 + OP_ENABLE_KTLS = 8 if sys.version_info >= (3, 11) or sys.platform == "linux": - OP_IGNORE_UNEXPECTED_EOF = ... + OP_IGNORE_UNEXPECTED_EOF = 128 OP_ALL: Options OP_NO_SSLv2: Options @@ -244,33 +244,33 @@ OPENSSL_VERSION_INFO: tuple[int, int, int, int, int] OPENSSL_VERSION_NUMBER: int class AlertDescription(enum.IntEnum): - ALERT_DESCRIPTION_ACCESS_DENIED = ... - ALERT_DESCRIPTION_BAD_CERTIFICATE = ... - ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE = ... - ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE = ... - ALERT_DESCRIPTION_BAD_RECORD_MAC = ... - ALERT_DESCRIPTION_CERTIFICATE_EXPIRED = ... - ALERT_DESCRIPTION_CERTIFICATE_REVOKED = ... - ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN = ... - ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE = ... - ALERT_DESCRIPTION_CLOSE_NOTIFY = ... - ALERT_DESCRIPTION_DECODE_ERROR = ... - ALERT_DESCRIPTION_DECOMPRESSION_FAILURE = ... - ALERT_DESCRIPTION_DECRYPT_ERROR = ... - ALERT_DESCRIPTION_HANDSHAKE_FAILURE = ... - ALERT_DESCRIPTION_ILLEGAL_PARAMETER = ... - ALERT_DESCRIPTION_INSUFFICIENT_SECURITY = ... - ALERT_DESCRIPTION_INTERNAL_ERROR = ... - ALERT_DESCRIPTION_NO_RENEGOTIATION = ... - ALERT_DESCRIPTION_PROTOCOL_VERSION = ... - ALERT_DESCRIPTION_RECORD_OVERFLOW = ... - ALERT_DESCRIPTION_UNEXPECTED_MESSAGE = ... - ALERT_DESCRIPTION_UNKNOWN_CA = ... - ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY = ... - ALERT_DESCRIPTION_UNRECOGNIZED_NAME = ... - ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE = ... - ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION = ... - ALERT_DESCRIPTION_USER_CANCELLED = ... + ALERT_DESCRIPTION_ACCESS_DENIED = 49 + ALERT_DESCRIPTION_BAD_CERTIFICATE = 42 + ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE = 114 + ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE = 113 + ALERT_DESCRIPTION_BAD_RECORD_MAC = 20 + ALERT_DESCRIPTION_CERTIFICATE_EXPIRED = 45 + ALERT_DESCRIPTION_CERTIFICATE_REVOKED = 44 + ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN = 46 + ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE = 111 + ALERT_DESCRIPTION_CLOSE_NOTIFY = 0 + ALERT_DESCRIPTION_DECODE_ERROR = 50 + ALERT_DESCRIPTION_DECOMPRESSION_FAILURE = 30 + ALERT_DESCRIPTION_DECRYPT_ERROR = 51 + ALERT_DESCRIPTION_HANDSHAKE_FAILURE = 40 + ALERT_DESCRIPTION_ILLEGAL_PARAMETER = 47 + ALERT_DESCRIPTION_INSUFFICIENT_SECURITY = 71 + ALERT_DESCRIPTION_INTERNAL_ERROR = 80 + ALERT_DESCRIPTION_NO_RENEGOTIATION = 100 + ALERT_DESCRIPTION_PROTOCOL_VERSION = 70 + ALERT_DESCRIPTION_RECORD_OVERFLOW = 22 + ALERT_DESCRIPTION_UNEXPECTED_MESSAGE = 10 + ALERT_DESCRIPTION_UNKNOWN_CA = 48 + ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY = 115 + ALERT_DESCRIPTION_UNRECOGNIZED_NAME = 112 + ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE = 43 + ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION = 110 + ALERT_DESCRIPTION_USER_CANCELLED = 90 ALERT_DESCRIPTION_HANDSHAKE_FAILURE: AlertDescription ALERT_DESCRIPTION_INTERNAL_ERROR: AlertDescription @@ -366,13 +366,13 @@ class SSLSocket(socket.socket): def sendmsg(self, *args: Never, **kwargs: Never) -> Never: ... # type: ignore[override] class TLSVersion(enum.IntEnum): - MINIMUM_SUPPORTED = ... - MAXIMUM_SUPPORTED = ... - SSLv3 = ... - TLSv1 = ... - TLSv1_1 = ... - TLSv1_2 = ... - TLSv1_3 = ... + MINIMUM_SUPPORTED = -2 + MAXIMUM_SUPPORTED = -1 + SSLv3 = 768 + TLSv1 = 769 + TLSv1_1 = 770 + TLSv1_2 = 771 + TLSv1_3 = 772 class SSLContext: check_hostname: bool @@ -498,15 +498,15 @@ class SSLSession: def __eq__(self, __value: object) -> bool: ... class SSLErrorNumber(enum.IntEnum): - SSL_ERROR_EOF = ... - SSL_ERROR_INVALID_ERROR_CODE = ... - SSL_ERROR_SSL = ... - SSL_ERROR_SYSCALL = ... - SSL_ERROR_WANT_CONNECT = ... - SSL_ERROR_WANT_READ = ... - SSL_ERROR_WANT_WRITE = ... - SSL_ERROR_WANT_X509_LOOKUP = ... - SSL_ERROR_ZERO_RETURN = ... + SSL_ERROR_EOF = 8 + SSL_ERROR_INVALID_ERROR_CODE = 10 + SSL_ERROR_SSL = 1 + SSL_ERROR_SYSCALL = 5 + SSL_ERROR_WANT_CONNECT = 7 + SSL_ERROR_WANT_READ = 2 + SSL_ERROR_WANT_WRITE = 3 + SSL_ERROR_WANT_X509_LOOKUP = 4 + SSL_ERROR_ZERO_RETURN = 6 SSL_ERROR_EOF: SSLErrorNumber # undocumented SSL_ERROR_INVALID_ERROR_CODE: SSLErrorNumber # undocumented diff --git a/stdlib/tkinter/__init__.pyi b/stdlib/tkinter/__init__.pyi index 9df109b10ada..af48903481f4 100644 --- a/stdlib/tkinter/__init__.pyi +++ b/stdlib/tkinter/__init__.pyi @@ -195,45 +195,45 @@ if sys.version_info >= (3, 11): serial: int class EventType(StrEnum): - Activate = ... - ButtonPress = ... + Activate = 36 + ButtonPress = 4 Button = ButtonPress - ButtonRelease = ... - Circulate = ... - CirculateRequest = ... - ClientMessage = ... - Colormap = ... - Configure = ... - ConfigureRequest = ... - Create = ... - Deactivate = ... - Destroy = ... - Enter = ... - Expose = ... - FocusIn = ... - FocusOut = ... - GraphicsExpose = ... - Gravity = ... - KeyPress = ... - Key = KeyPress - KeyRelease = ... - Keymap = ... - Leave = ... - Map = ... - MapRequest = ... - Mapping = ... - Motion = ... - MouseWheel = ... - NoExpose = ... - Property = ... - Reparent = ... - ResizeRequest = ... - Selection = ... - SelectionClear = ... - SelectionRequest = ... - Unmap = ... - VirtualEvent = ... - Visibility = ... + ButtonRelease = 5 + Circulate = 26 + CirculateRequest = 27 + ClientMessage = 33 + Colormap = 32 + Configure = 22 + ConfigureRequest = 23 + Create = 16 + Deactivate = 37 + Destroy = 17 + Enter = 7 + Expose = 12 + FocusIn = 9 + FocusOut = 10 + GraphicsExpose = 13 + Gravity = 24 + KeyPress = 2 + Key = 2 + KeyRelease = 3 + Keymap = 11 + Leave = 8 + Map = 19 + MapRequest = 20 + Mapping = 34 + Motion = 6 + MouseWheel = 38 + NoExpose = 14 + Property = 28 + Reparent = 21 + ResizeRequest = 25 + Selection = 31 + SelectionClear = 29 + SelectionRequest = 30 + Unmap = 18 + VirtualEvent = 35 + Visibility = 15 _W = TypeVar("_W", bound=Misc) # Events considered covariant because you should never assign to event.widget. diff --git a/stdlib/uuid.pyi b/stdlib/uuid.pyi index a7f38cc1876c..1be7a5ef009f 100644 --- a/stdlib/uuid.pyi +++ b/stdlib/uuid.pyi @@ -7,8 +7,8 @@ from typing_extensions import TypeAlias _FieldsType: TypeAlias = tuple[int, int, int, int, int, int] class SafeUUID(Enum): - safe = ... - unsafe = ... + safe = 0 + unsafe = -1 unknown = None class UUID: From e7df031a6c5a29b311b38ec8c5ce20efeb7db01e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 03:28:32 +0000 Subject: [PATCH 04/30] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/pstats.pyi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/stdlib/pstats.pyi b/stdlib/pstats.pyi index 20dd59d8753f..635d41e4a182 100644 --- a/stdlib/pstats.pyi +++ b/stdlib/pstats.pyi @@ -14,15 +14,15 @@ else: _Selector: TypeAlias = str | float | int class SortKey(StrEnum): - CALLS = 'calls' - CUMULATIVE = 'cumulative' - FILENAME = 'filename' - LINE = 'line' - NAME = 'name' - NFL = 'nfl' - PCALLS = 'pcalls' - STDNAME = 'stdname' - TIME = 'time' + CALLS = "calls" + CUMULATIVE = "cumulative" + FILENAME = "filename" + LINE = "line" + NAME = "name" + NFL = "nfl" + PCALLS = "pcalls" + STDNAME = "stdname" + TIME = "time" if sys.version_info >= (3, 9): from dataclasses import dataclass From 44ea4d1a50d903cf7b8128a3e56a57c0f22fa3d2 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sun, 21 Jan 2024 19:36:12 -0800 Subject: [PATCH 05/30] Fixed more issues found by stubtest --- stdlib/tkinter/__init__.pyi | 76 +++++++-------- stubs/psutil/psutil/_common.pyi | 10 +- stubs/pynput/pynput/keyboard/_base.pyi | 128 ++++++++++++------------- 3 files changed, 107 insertions(+), 107 deletions(-) diff --git a/stdlib/tkinter/__init__.pyi b/stdlib/tkinter/__init__.pyi index af48903481f4..1f8dcf2a1e8e 100644 --- a/stdlib/tkinter/__init__.pyi +++ b/stdlib/tkinter/__init__.pyi @@ -195,45 +195,45 @@ if sys.version_info >= (3, 11): serial: int class EventType(StrEnum): - Activate = 36 - ButtonPress = 4 + Activate = '36' + ButtonPress = '4' Button = ButtonPress - ButtonRelease = 5 - Circulate = 26 - CirculateRequest = 27 - ClientMessage = 33 - Colormap = 32 - Configure = 22 - ConfigureRequest = 23 - Create = 16 - Deactivate = 37 - Destroy = 17 - Enter = 7 - Expose = 12 - FocusIn = 9 - FocusOut = 10 - GraphicsExpose = 13 - Gravity = 24 - KeyPress = 2 - Key = 2 - KeyRelease = 3 - Keymap = 11 - Leave = 8 - Map = 19 - MapRequest = 20 - Mapping = 34 - Motion = 6 - MouseWheel = 38 - NoExpose = 14 - Property = 28 - Reparent = 21 - ResizeRequest = 25 - Selection = 31 - SelectionClear = 29 - SelectionRequest = 30 - Unmap = 18 - VirtualEvent = 35 - Visibility = 15 + ButtonRelease = '5' + Circulate = '26' + CirculateRequest = '27' + ClientMessage = '33' + Colormap = '32' + Configure = '22' + ConfigureRequest = '23' + Create = '16' + Deactivate = '37' + Destroy = '17' + Enter = '7' + Expose = '12' + FocusIn = '9' + FocusOut = '10' + GraphicsExpose = '13' + Gravity = '24' + KeyPress = '2' + Key = '2' + KeyRelease = '3' + Keymap = '11' + Leave = '8' + Map = '19' + MapRequest = '20' + Mapping = '34' + Motion = '6' + MouseWheel = '38' + NoExpose = '14' + Property = '28' + Reparent = '21' + ResizeRequest = '25' + Selection = '31' + SelectionClear = '29' + SelectionRequest = '30' + Unmap = '18' + VirtualEvent = '35' + Visibility = '15' _W = TypeVar("_W", bound=Misc) # Events considered covariant because you should never assign to event.widget. diff --git a/stubs/psutil/psutil/_common.pyi b/stubs/psutil/psutil/_common.pyi index 7e846cf985cc..d755aa61d9a7 100644 --- a/stubs/psutil/psutil/_common.pyi +++ b/stubs/psutil/psutil/_common.pyi @@ -48,16 +48,16 @@ NIC_DUPLEX_HALF: int NIC_DUPLEX_UNKNOWN: int class NicDuplex(enum.IntEnum): - NIC_DUPLEX_FULL = ... - NIC_DUPLEX_HALF = ... - NIC_DUPLEX_UNKNOWN = ... + NIC_DUPLEX_FULL = 2 + NIC_DUPLEX_HALF = 1 + NIC_DUPLEX_UNKNOWN = 0 POWER_TIME_UNKNOWN: int POWER_TIME_UNLIMITED: int class BatteryTime(enum.IntEnum): - POWER_TIME_UNKNOWN = ... - POWER_TIME_UNLIMITED = ... + POWER_TIME_UNKNOWN = -1 + POWER_TIME_UNLIMITED = -2 ENCODING: str ENCODING_ERRS: str diff --git a/stubs/pynput/pynput/keyboard/_base.pyi b/stubs/pynput/pynput/keyboard/_base.pyi index f233b50e2239..46db628c43de 100644 --- a/stubs/pynput/pynput/keyboard/_base.pyi +++ b/stubs/pynput/pynput/keyboard/_base.pyi @@ -25,71 +25,71 @@ class KeyCode: def from_dead(cls, char: str, **kwargs: Any) -> Self: ... class Key(enum.Enum): - alt = ... - alt_l = ... - alt_r = ... - alt_gr = ... - backspace = ... - caps_lock = ... - cmd = ... - cmd_l = ... - cmd_r = ... - ctrl = ... - ctrl_l = ... - ctrl_r = ... - delete = ... - down = ... - end = ... - enter = ... - esc = ... - f1 = ... - f2 = ... - f3 = ... - f4 = ... - f5 = ... - f6 = ... - f7 = ... - f8 = ... - f9 = ... - f10 = ... - f11 = ... - f12 = ... - f13 = ... - f14 = ... - f15 = ... - f16 = ... - f17 = ... - f18 = ... - f19 = ... - f20 = ... + alt = 0 + alt_l = 0 + alt_r = 0 + alt_gr = 0 + backspace = 0 + caps_lock = 0 + cmd = 0 + cmd_l = 0 + cmd_r = 0 + ctrl = 0 + ctrl_l = 0 + ctrl_r = 0 + delete = 0 + down = 0 + end = 0 + enter = 0 + esc = 0 + f1 = 0 + f2 = 0 + f3 = 0 + f4 = 0 + f5 = 0 + f6 = 0 + f7 = 0 + f8 = 0 + f9 = 0 + f10 = 0 + f11 = 0 + f12 = 0 + f13 = 0 + f14 = 0 + f15 = 0 + f16 = 0 + f17 = 0 + f18 = 0 + f19 = 0 + f20 = 0 if sys.platform == "win32": - f21 = ... - f22 = ... - f23 = ... - f24 = ... - home = ... - left = ... - page_down = ... - page_up = ... - right = ... - shift = ... - shift_l = ... - shift_r = ... - space = ... - tab = ... - up = ... - media_play_pause = ... - media_volume_mute = ... - media_volume_down = ... - media_volume_up = ... - media_previous = ... - media_next = ... - insert = ... - menu = ... - num_lock = ... - pause = ... - print_screen = ... - scroll_lock = ... + f21 = 0 + f22 = 0 + f23 = 0 + f24 = 0 + home = 0 + left = 0 + page_down = 0 + page_up = 0 + right = 0 + shift = 0 + shift_l = 0 + shift_r = 0 + space = 0 + tab = 0 + up = 0 + media_play_pause = 0 + media_volume_mute = 0 + media_volume_down = 0 + media_volume_up = 0 + media_previous = 0 + media_next = 0 + insert = 0 + menu = 0 + num_lock = 0 + pause = 0 + print_screen = 0 + scroll_lock = 0 class Controller: _KeyCode: ClassVar[type[KeyCode]] # undocumented From 76030ba37f32bb8a04c5092d83c7acb7d13fc2cb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 03:37:09 +0000 Subject: [PATCH 06/30] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/tkinter/__init__.pyi | 76 ++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/stdlib/tkinter/__init__.pyi b/stdlib/tkinter/__init__.pyi index 1f8dcf2a1e8e..fc97f0097c83 100644 --- a/stdlib/tkinter/__init__.pyi +++ b/stdlib/tkinter/__init__.pyi @@ -195,45 +195,45 @@ if sys.version_info >= (3, 11): serial: int class EventType(StrEnum): - Activate = '36' - ButtonPress = '4' + Activate = "36" + ButtonPress = "4" Button = ButtonPress - ButtonRelease = '5' - Circulate = '26' - CirculateRequest = '27' - ClientMessage = '33' - Colormap = '32' - Configure = '22' - ConfigureRequest = '23' - Create = '16' - Deactivate = '37' - Destroy = '17' - Enter = '7' - Expose = '12' - FocusIn = '9' - FocusOut = '10' - GraphicsExpose = '13' - Gravity = '24' - KeyPress = '2' - Key = '2' - KeyRelease = '3' - Keymap = '11' - Leave = '8' - Map = '19' - MapRequest = '20' - Mapping = '34' - Motion = '6' - MouseWheel = '38' - NoExpose = '14' - Property = '28' - Reparent = '21' - ResizeRequest = '25' - Selection = '31' - SelectionClear = '29' - SelectionRequest = '30' - Unmap = '18' - VirtualEvent = '35' - Visibility = '15' + ButtonRelease = "5" + Circulate = "26" + CirculateRequest = "27" + ClientMessage = "33" + Colormap = "32" + Configure = "22" + ConfigureRequest = "23" + Create = "16" + Deactivate = "37" + Destroy = "17" + Enter = "7" + Expose = "12" + FocusIn = "9" + FocusOut = "10" + GraphicsExpose = "13" + Gravity = "24" + KeyPress = "2" + Key = "2" + KeyRelease = "3" + Keymap = "11" + Leave = "8" + Map = "19" + MapRequest = "20" + Mapping = "34" + Motion = "6" + MouseWheel = "38" + NoExpose = "14" + Property = "28" + Reparent = "21" + ResizeRequest = "25" + Selection = "31" + SelectionClear = "29" + SelectionRequest = "30" + Unmap = "18" + VirtualEvent = "35" + Visibility = "15" _W = TypeVar("_W", bound=Misc) # Events considered covariant because you should never assign to event.widget. From 0de299bcf03252f225278a42056ae1b7d7e34e08 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sun, 21 Jan 2024 19:54:16 -0800 Subject: [PATCH 07/30] More fixes from tests --- stdlib/asyncio/locks.pyi | 8 +- stdlib/asyncio/sslproto.pyi | 18 +- stdlib/http/__init__.pyi | 18 +- stdlib/inspect.pyi | 38 +- stubs/Pillow/PIL/BlpImagePlugin.pyi | 14 +- stubs/Pillow/PIL/ExifTags.pyi | 662 +++++++++--------- stubs/Pillow/PIL/FtexImagePlugin.pyi | 4 +- stubs/Pillow/PIL/ImageCms.pyi | 14 +- stubs/Pillow/PIL/PngImagePlugin.pyi | 10 +- .../aws_xray_sdk/core/sampling/reservoir.pyi | 6 +- stubs/fpdf2/fpdf/enums.pyi | 4 +- stubs/pynput/pynput/mouse/_base.pyi | 8 +- stubs/regex/regex/_regex_core.pyi | 68 +- .../setuptools/command/editable_wheel.pyi | 6 +- 14 files changed, 439 insertions(+), 439 deletions(-) diff --git a/stdlib/asyncio/locks.pyi b/stdlib/asyncio/locks.pyi index 59d6e3bd4505..a22096e54c4a 100644 --- a/stdlib/asyncio/locks.pyi +++ b/stdlib/asyncio/locks.pyi @@ -98,10 +98,10 @@ class BoundedSemaphore(Semaphore): ... if sys.version_info >= (3, 11): class _BarrierState(enum.Enum): # undocumented - FILLING = ... - DRAINING = ... - RESETTING = ... - BROKEN = ... + FILLING = 'filling' + DRAINING = 'draining' + RESETTING = 'resetting' + BROKEN = 'broken' class Barrier(_LoopBoundMixin): def __init__(self, parties: int) -> None: ... diff --git a/stdlib/asyncio/sslproto.pyi b/stdlib/asyncio/sslproto.pyi index a99b0e3771a2..23e2dac11ab2 100644 --- a/stdlib/asyncio/sslproto.pyi +++ b/stdlib/asyncio/sslproto.pyi @@ -14,17 +14,17 @@ if sys.version_info >= (3, 11): SSLAgainErrors: tuple[type[ssl.SSLWantReadError], type[ssl.SSLSyscallError]] class SSLProtocolState(Enum): - UNWRAPPED = ... - DO_HANDSHAKE = ... - WRAPPED = ... - FLUSHING = ... - SHUTDOWN = ... + UNWRAPPED = "UNWRAPPED" + DO_HANDSHAKE = "DO_HANDSHAKE" + WRAPPED = "WRAPPED" + FLUSHING = "FLUSHING" + SHUTDOWN = "SHUTDOWN" class AppProtocolState(Enum): - STATE_INIT = ... - STATE_CON_MADE = ... - STATE_EOF = ... - STATE_CON_LOST = ... + STATE_INIT = "STATE_INIT" + STATE_CON_MADE = "STATE_CON_MADE" + STATE_EOF = "STATE_EOF" + STATE_CON_LOST = "STATE_CON_LOST" def add_flowcontrol_defaults(high: int | None, low: int | None, kb: int) -> tuple[int, int]: ... else: diff --git a/stdlib/http/__init__.pyi b/stdlib/http/__init__.pyi index 3396dab81a7d..a56a080ffb0d 100644 --- a/stdlib/http/__init__.pyi +++ b/stdlib/http/__init__.pyi @@ -94,12 +94,12 @@ if sys.version_info >= (3, 11): class HTTPMethod(StrEnum): @property def description(self) -> str: ... - CONNECT = ... - DELETE = ... - GET = ... - HEAD = ... - OPTIONS = ... - PATCH = ... - POST = ... - PUT = ... - TRACE = ... + CONNECT = 'CONNECT' + DELETE = 'DELETE' + GET = 'GET' + HEAD = 'HEAD' + OPTIONS = 'OPTIONS' + PATCH = 'PATCH' + POST = 'POST' + PUT = 'PUT' + TRACE = 'TRACE' diff --git a/stdlib/inspect.pyi b/stdlib/inspect.pyi index 0f6fe7784641..a83b31ee647f 100644 --- a/stdlib/inspect.pyi +++ b/stdlib/inspect.pyi @@ -610,22 +610,22 @@ if sys.version_info >= (3, 9): if sys.version_info >= (3, 12): class BufferFlags(enum.IntFlag): - SIMPLE = ... - WRITABLE = ... - FORMAT = ... - ND = ... - STRIDES = ... - C_CONTIGUOUS = ... - F_CONTIGUOUS = ... - ANY_CONTIGUOUS = ... - INDIRECT = ... - CONTIG = ... - CONTIG_RO = ... - STRIDED = ... - STRIDED_RO = ... - RECORDS = ... - RECORDS_RO = ... - FULL = ... - FULL_RO = ... - READ = ... - WRITE = ... + SIMPLE = 0x0 + WRITABLE = 0x1 + FORMAT = 0x4 + ND = 0x8 + STRIDES = 0x10 | ND + C_CONTIGUOUS = 0x20 | STRIDES + F_CONTIGUOUS = 0x40 | STRIDES + ANY_CONTIGUOUS = 0x80 | STRIDES + INDIRECT = 0x100 | STRIDES + CONTIG = ND | WRITABLE + CONTIG_RO = ND + STRIDED = STRIDES | WRITABLE + STRIDED_RO = STRIDES + RECORDS = STRIDES | WRITABLE | FORMAT + RECORDS_RO = STRIDES | FORMAT + FULL = INDIRECT | WRITABLE | FORMAT + FULL_RO = INDIRECT | FORMAT + READ = 0x100 + WRITE = 0x200 diff --git a/stubs/Pillow/PIL/BlpImagePlugin.pyi b/stubs/Pillow/PIL/BlpImagePlugin.pyi index 8b6e0d44aa7b..c69e465062ba 100644 --- a/stubs/Pillow/PIL/BlpImagePlugin.pyi +++ b/stubs/Pillow/PIL/BlpImagePlugin.pyi @@ -5,17 +5,17 @@ from typing import ClassVar, Literal from .ImageFile import ImageFile, PyDecoder, PyEncoder class Format(IntEnum): - JPEG = ... + JPEG = 0 class Encoding(IntEnum): - UNCOMPRESSED = ... - DXT = ... - UNCOMPRESSED_RAW_BGRA = ... + UNCOMPRESSED = 1 + DXT = 2 + UNCOMPRESSED_RAW_BGRA = 3 class AlphaEncoding(IntEnum): - DXT1 = ... - DXT3 = ... - DXT5 = ... + DXT1 = 0 + DXT3 = 1 + DXT5 = 7 def unpack_565(i): ... def decode_dxt1(data, alpha: bool = False): ... diff --git a/stubs/Pillow/PIL/ExifTags.pyi b/stubs/Pillow/PIL/ExifTags.pyi index 1c633e99db78..615ed585c095 100644 --- a/stubs/Pillow/PIL/ExifTags.pyi +++ b/stubs/Pillow/PIL/ExifTags.pyi @@ -2,346 +2,346 @@ from collections.abc import Mapping from enum import IntEnum class Base(IntEnum): - InteropIndex = ... - ProcessingSoftware = ... - NewSubfileType = ... - SubfileType = ... - ImageWidth = ... - ImageLength = ... - BitsPerSample = ... - Compression = ... - PhotometricInterpretation = ... - Thresholding = ... - CellWidth = ... - CellLength = ... - FillOrder = ... - DocumentName = ... - ImageDescription = ... - Make = ... - Model = ... - StripOffsets = ... - Orientation = ... - SamplesPerPixel = ... - RowsPerStrip = ... - StripByteCounts = ... - MinSampleValue = ... - MaxSampleValue = ... - XResolution = ... - YResolution = ... - PlanarConfiguration = ... - PageName = ... - FreeOffsets = ... - FreeByteCounts = ... - GrayResponseUnit = ... - GrayResponseCurve = ... - T4Options = ... - T6Options = ... - ResolutionUnit = ... - PageNumber = ... - TransferFunction = ... - Software = ... - DateTime = ... - Artist = ... - HostComputer = ... - Predictor = ... - WhitePoint = ... - PrimaryChromaticities = ... - ColorMap = ... - HalftoneHints = ... - TileWidth = ... - TileLength = ... - TileOffsets = ... - TileByteCounts = ... - SubIFDs = ... - InkSet = ... - InkNames = ... - NumberOfInks = ... - DotRange = ... - TargetPrinter = ... - ExtraSamples = ... - SampleFormat = ... - SMinSampleValue = ... - SMaxSampleValue = ... - TransferRange = ... - ClipPath = ... - XClipPathUnits = ... - YClipPathUnits = ... - Indexed = ... - JPEGTables = ... - OPIProxy = ... - JPEGProc = ... - JpegIFOffset = ... - JpegIFByteCount = ... - JpegRestartInterval = ... - JpegLosslessPredictors = ... - JpegPointTransforms = ... - JpegQTables = ... - JpegDCTables = ... - JpegACTables = ... - YCbCrCoefficients = ... - YCbCrSubSampling = ... - YCbCrPositioning = ... - ReferenceBlackWhite = ... - XMLPacket = ... - RelatedImageFileFormat = ... - RelatedImageWidth = ... - RelatedImageLength = ... - Rating = ... - RatingPercent = ... - ImageID = ... - CFARepeatPatternDim = ... - BatteryLevel = ... - Copyright = ... - ExposureTime = ... - FNumber = ... - IPTCNAA = ... - ImageResources = ... - ExifOffset = ... - InterColorProfile = ... - ExposureProgram = ... - SpectralSensitivity = ... - GPSInfo = ... - ISOSpeedRatings = ... - OECF = ... - Interlace = ... - TimeZoneOffset = ... - SelfTimerMode = ... - SensitivityType = ... - StandardOutputSensitivity = ... - RecommendedExposureIndex = ... - ISOSpeed = ... - ISOSpeedLatitudeyyy = ... - ISOSpeedLatitudezzz = ... - ExifVersion = ... - DateTimeOriginal = ... - DateTimeDigitized = ... - OffsetTime = ... - OffsetTimeOriginal = ... - OffsetTimeDigitized = ... - ComponentsConfiguration = ... - CompressedBitsPerPixel = ... - ShutterSpeedValue = ... - ApertureValue = ... - BrightnessValue = ... - ExposureBiasValue = ... - MaxApertureValue = ... - SubjectDistance = ... - MeteringMode = ... - LightSource = ... - Flash = ... - FocalLength = ... - Noise = ... - ImageNumber = ... - SecurityClassification = ... - ImageHistory = ... - TIFFEPStandardID = ... - MakerNote = ... - UserComment = ... - SubsecTime = ... - SubsecTimeOriginal = ... - SubsecTimeDigitized = ... - AmbientTemperature = ... - Humidity = ... - Pressure = ... - WaterDepth = ... - Acceleration = ... - CameraElevationAngle = ... - XPTitle = ... - XPComment = ... - XPAuthor = ... - XPKeywords = ... - XPSubject = ... - FlashPixVersion = ... - ColorSpace = ... - ExifImageWidth = ... - ExifImageHeight = ... - RelatedSoundFile = ... - ExifInteroperabilityOffset = ... - FlashEnergy = ... - SpatialFrequencyResponse = ... - FocalPlaneXResolution = ... - FocalPlaneYResolution = ... - FocalPlaneResolutionUnit = ... - SubjectLocation = ... - ExposureIndex = ... - SensingMethod = ... - FileSource = ... - SceneType = ... - CFAPattern = ... - CustomRendered = ... - ExposureMode = ... - WhiteBalance = ... - DigitalZoomRatio = ... - FocalLengthIn35mmFilm = ... - SceneCaptureType = ... - GainControl = ... - Contrast = ... - Saturation = ... - Sharpness = ... - DeviceSettingDescription = ... - SubjectDistanceRange = ... - ImageUniqueID = ... - CameraOwnerName = ... - BodySerialNumber = ... - LensSpecification = ... - LensMake = ... - LensModel = ... - LensSerialNumber = ... - CompositeImage = ... - CompositeImageCount = ... - CompositeImageExposureTimes = ... - Gamma = ... - PrintImageMatching = ... - DNGVersion = ... - DNGBackwardVersion = ... - UniqueCameraModel = ... - LocalizedCameraModel = ... - CFAPlaneColor = ... - CFALayout = ... - LinearizationTable = ... - BlackLevelRepeatDim = ... - BlackLevel = ... - BlackLevelDeltaH = ... - BlackLevelDeltaV = ... - WhiteLevel = ... - DefaultScale = ... - DefaultCropOrigin = ... - DefaultCropSize = ... - ColorMatrix1 = ... - ColorMatrix2 = ... - CameraCalibration1 = ... - CameraCalibration2 = ... - ReductionMatrix1 = ... - ReductionMatrix2 = ... - AnalogBalance = ... - AsShotNeutral = ... - AsShotWhiteXY = ... - BaselineExposure = ... - BaselineNoise = ... - BaselineSharpness = ... - BayerGreenSplit = ... - LinearResponseLimit = ... - CameraSerialNumber = ... - LensInfo = ... - ChromaBlurRadius = ... - AntiAliasStrength = ... - ShadowScale = ... - DNGPrivateData = ... - MakerNoteSafety = ... - CalibrationIlluminant1 = ... - CalibrationIlluminant2 = ... - BestQualityScale = ... - RawDataUniqueID = ... - OriginalRawFileName = ... - OriginalRawFileData = ... - ActiveArea = ... - MaskedAreas = ... - AsShotICCProfile = ... - AsShotPreProfileMatrix = ... - CurrentICCProfile = ... - CurrentPreProfileMatrix = ... - ColorimetricReference = ... - CameraCalibrationSignature = ... - ProfileCalibrationSignature = ... - AsShotProfileName = ... - NoiseReductionApplied = ... - ProfileName = ... - ProfileHueSatMapDims = ... - ProfileHueSatMapData1 = ... - ProfileHueSatMapData2 = ... - ProfileToneCurve = ... - ProfileEmbedPolicy = ... - ProfileCopyright = ... - ForwardMatrix1 = ... - ForwardMatrix2 = ... - PreviewApplicationName = ... - PreviewApplicationVersion = ... - PreviewSettingsName = ... - PreviewSettingsDigest = ... - PreviewColorSpace = ... - PreviewDateTime = ... - RawImageDigest = ... - OriginalRawFileDigest = ... - SubTileBlockSize = ... - RowInterleaveFactor = ... - ProfileLookTableDims = ... - ProfileLookTableData = ... - OpcodeList1 = ... - OpcodeList2 = ... - OpcodeList3 = ... - NoiseProfile = ... + InteropIndex = 0x0001 + ProcessingSoftware = 0x000B + NewSubfileType = 0x00FE + SubfileType = 0x00FF + ImageWidth = 0x0100 + ImageLength = 0x0101 + BitsPerSample = 0x0102 + Compression = 0x0103 + PhotometricInterpretation = 0x0106 + Thresholding = 0x0107 + CellWidth = 0x0108 + CellLength = 0x0109 + FillOrder = 0x010A + DocumentName = 0x010D + ImageDescription = 0x010E + Make = 0x010F + Model = 0x0110 + StripOffsets = 0x0111 + Orientation = 0x0112 + SamplesPerPixel = 0x0115 + RowsPerStrip = 0x0116 + StripByteCounts = 0x0117 + MinSampleValue = 0x0118 + MaxSampleValue = 0x0119 + XResolution = 0x011A + YResolution = 0x011B + PlanarConfiguration = 0x011C + PageName = 0x011D + FreeOffsets = 0x0120 + FreeByteCounts = 0x0121 + GrayResponseUnit = 0x0122 + GrayResponseCurve = 0x0123 + T4Options = 0x0124 + T6Options = 0x0125 + ResolutionUnit = 0x0128 + PageNumber = 0x0129 + TransferFunction = 0x012D + Software = 0x0131 + DateTime = 0x0132 + Artist = 0x013B + HostComputer = 0x013C + Predictor = 0x013D + WhitePoint = 0x013E + PrimaryChromaticities = 0x013F + ColorMap = 0x0140 + HalftoneHints = 0x0141 + TileWidth = 0x0142 + TileLength = 0x0143 + TileOffsets = 0x0144 + TileByteCounts = 0x0145 + SubIFDs = 0x014A + InkSet = 0x014C + InkNames = 0x014D + NumberOfInks = 0x014E + DotRange = 0x0150 + TargetPrinter = 0x0151 + ExtraSamples = 0x0152 + SampleFormat = 0x0153 + SMinSampleValue = 0x0154 + SMaxSampleValue = 0x0155 + TransferRange = 0x0156 + ClipPath = 0x0157 + XClipPathUnits = 0x0158 + YClipPathUnits = 0x0159 + Indexed = 0x015A + JPEGTables = 0x015B + OPIProxy = 0x015F + JPEGProc = 0x0200 + JpegIFOffset = 0x0201 + JpegIFByteCount = 0x0202 + JpegRestartInterval = 0x0203 + JpegLosslessPredictors = 0x0205 + JpegPointTransforms = 0x0206 + JpegQTables = 0x0207 + JpegDCTables = 0x0208 + JpegACTables = 0x0209 + YCbCrCoefficients = 0x0211 + YCbCrSubSampling = 0x0212 + YCbCrPositioning = 0x0213 + ReferenceBlackWhite = 0x0214 + XMLPacket = 0x02BC + RelatedImageFileFormat = 0x1000 + RelatedImageWidth = 0x1001 + RelatedImageLength = 0x1002 + Rating = 0x4746 + RatingPercent = 0x4749 + ImageID = 0x800D + CFARepeatPatternDim = 0x828D + BatteryLevel = 0x828F + Copyright = 0x8298 + ExposureTime = 0x829A + FNumber = 0x829D + IPTCNAA = 0x83BB + ImageResources = 0x8649 + ExifOffset = 0x8769 + InterColorProfile = 0x8773 + ExposureProgram = 0x8822 + SpectralSensitivity = 0x8824 + GPSInfo = 0x8825 + ISOSpeedRatings = 0x8827 + OECF = 0x8828 + Interlace = 0x8829 + TimeZoneOffset = 0x882A + SelfTimerMode = 0x882B + SensitivityType = 0x8830 + StandardOutputSensitivity = 0x8831 + RecommendedExposureIndex = 0x8832 + ISOSpeed = 0x8833 + ISOSpeedLatitudeyyy = 0x8834 + ISOSpeedLatitudezzz = 0x8835 + ExifVersion = 0x9000 + DateTimeOriginal = 0x9003 + DateTimeDigitized = 0x9004 + OffsetTime = 0x9010 + OffsetTimeOriginal = 0x9011 + OffsetTimeDigitized = 0x9012 + ComponentsConfiguration = 0x9101 + CompressedBitsPerPixel = 0x9102 + ShutterSpeedValue = 0x9201 + ApertureValue = 0x9202 + BrightnessValue = 0x9203 + ExposureBiasValue = 0x9204 + MaxApertureValue = 0x9205 + SubjectDistance = 0x9206 + MeteringMode = 0x9207 + LightSource = 0x9208 + Flash = 0x9209 + FocalLength = 0x920A + Noise = 0x920D + ImageNumber = 0x9211 + SecurityClassification = 0x9212 + ImageHistory = 0x9213 + TIFFEPStandardID = 0x9216 + MakerNote = 0x927C + UserComment = 0x9286 + SubsecTime = 0x9290 + SubsecTimeOriginal = 0x9291 + SubsecTimeDigitized = 0x9292 + AmbientTemperature = 0x9400 + Humidity = 0x9401 + Pressure = 0x9402 + WaterDepth = 0x9403 + Acceleration = 0x9404 + CameraElevationAngle = 0x9405 + XPTitle = 0x9C9B + XPComment = 0x9C9C + XPAuthor = 0x9C9D + XPKeywords = 0x9C9E + XPSubject = 0x9C9F + FlashPixVersion = 0xA000 + ColorSpace = 0xA001 + ExifImageWidth = 0xA002 + ExifImageHeight = 0xA003 + RelatedSoundFile = 0xA004 + ExifInteroperabilityOffset = 0xA005 + FlashEnergy = 0xA20B + SpatialFrequencyResponse = 0xA20C + FocalPlaneXResolution = 0xA20E + FocalPlaneYResolution = 0xA20F + FocalPlaneResolutionUnit = 0xA210 + SubjectLocation = 0xA214 + ExposureIndex = 0xA215 + SensingMethod = 0xA217 + FileSource = 0xA300 + SceneType = 0xA301 + CFAPattern = 0xA302 + CustomRendered = 0xA401 + ExposureMode = 0xA402 + WhiteBalance = 0xA403 + DigitalZoomRatio = 0xA404 + FocalLengthIn35mmFilm = 0xA405 + SceneCaptureType = 0xA406 + GainControl = 0xA407 + Contrast = 0xA408 + Saturation = 0xA409 + Sharpness = 0xA40A + DeviceSettingDescription = 0xA40B + SubjectDistanceRange = 0xA40C + ImageUniqueID = 0xA420 + CameraOwnerName = 0xA430 + BodySerialNumber = 0xA431 + LensSpecification = 0xA432 + LensMake = 0xA433 + LensModel = 0xA434 + LensSerialNumber = 0xA435 + CompositeImage = 0xA460 + CompositeImageCount = 0xA461 + CompositeImageExposureTimes = 0xA462 + Gamma = 0xA500 + PrintImageMatching = 0xC4A5 + DNGVersion = 0xC612 + DNGBackwardVersion = 0xC613 + UniqueCameraModel = 0xC614 + LocalizedCameraModel = 0xC615 + CFAPlaneColor = 0xC616 + CFALayout = 0xC617 + LinearizationTable = 0xC618 + BlackLevelRepeatDim = 0xC619 + BlackLevel = 0xC61A + BlackLevelDeltaH = 0xC61B + BlackLevelDeltaV = 0xC61C + WhiteLevel = 0xC61D + DefaultScale = 0xC61E + DefaultCropOrigin = 0xC61F + DefaultCropSize = 0xC620 + ColorMatrix1 = 0xC621 + ColorMatrix2 = 0xC622 + CameraCalibration1 = 0xC623 + CameraCalibration2 = 0xC624 + ReductionMatrix1 = 0xC625 + ReductionMatrix2 = 0xC626 + AnalogBalance = 0xC627 + AsShotNeutral = 0xC628 + AsShotWhiteXY = 0xC629 + BaselineExposure = 0xC62A + BaselineNoise = 0xC62B + BaselineSharpness = 0xC62C + BayerGreenSplit = 0xC62D + LinearResponseLimit = 0xC62E + CameraSerialNumber = 0xC62F + LensInfo = 0xC630 + ChromaBlurRadius = 0xC631 + AntiAliasStrength = 0xC632 + ShadowScale = 0xC633 + DNGPrivateData = 0xC634 + MakerNoteSafety = 0xC635 + CalibrationIlluminant1 = 0xC65A + CalibrationIlluminant2 = 0xC65B + BestQualityScale = 0xC65C + RawDataUniqueID = 0xC65D + OriginalRawFileName = 0xC68B + OriginalRawFileData = 0xC68C + ActiveArea = 0xC68D + MaskedAreas = 0xC68E + AsShotICCProfile = 0xC68F + AsShotPreProfileMatrix = 0xC690 + CurrentICCProfile = 0xC691 + CurrentPreProfileMatrix = 0xC692 + ColorimetricReference = 0xC6BF + CameraCalibrationSignature = 0xC6F3 + ProfileCalibrationSignature = 0xC6F4 + AsShotProfileName = 0xC6F6 + NoiseReductionApplied = 0xC6F7 + ProfileName = 0xC6F8 + ProfileHueSatMapDims = 0xC6F9 + ProfileHueSatMapData1 = 0xC6FA + ProfileHueSatMapData2 = 0xC6FB + ProfileToneCurve = 0xC6FC + ProfileEmbedPolicy = 0xC6FD + ProfileCopyright = 0xC6FE + ForwardMatrix1 = 0xC714 + ForwardMatrix2 = 0xC715 + PreviewApplicationName = 0xC716 + PreviewApplicationVersion = 0xC717 + PreviewSettingsName = 0xC718 + PreviewSettingsDigest = 0xC719 + PreviewColorSpace = 0xC71A + PreviewDateTime = 0xC71B + RawImageDigest = 0xC71C + OriginalRawFileDigest = 0xC71D + SubTileBlockSize = 0xC71E + RowInterleaveFactor = 0xC71F + ProfileLookTableDims = 0xC725 + ProfileLookTableData = 0xC726 + OpcodeList1 = 0xC740 + OpcodeList2 = 0xC741 + OpcodeList3 = 0xC74E + NoiseProfile = 0xC761 TAGS: Mapping[int, str] class GPS(IntEnum): - GPSVersionID = ... - GPSLatitudeRef = ... - GPSLatitude = ... - GPSLongitudeRef = ... - GPSLongitude = ... - GPSAltitudeRef = ... - GPSAltitude = ... - GPSTimeStamp = ... - GPSSatellites = ... - GPSStatus = ... - GPSMeasureMode = ... - GPSDOP = ... - GPSSpeedRef = ... - GPSSpeed = ... - GPSTrackRef = ... - GPSTrack = ... - GPSImgDirectionRef = ... - GPSImgDirection = ... - GPSMapDatum = ... - GPSDestLatitudeRef = ... - GPSDestLatitude = ... - GPSDestLongitudeRef = ... - GPSDestLongitude = ... - GPSDestBearingRef = ... - GPSDestBearing = ... - GPSDestDistanceRef = ... - GPSDestDistance = ... - GPSProcessingMethod = ... - GPSAreaInformation = ... - GPSDateStamp = ... - GPSDifferential = ... - GPSHPositioningError = ... + GPSVersionID = 0 + GPSLatitudeRef = 1 + GPSLatitude = 2 + GPSLongitudeRef = 3 + GPSLongitude = 4 + GPSAltitudeRef = 5 + GPSAltitude = 6 + GPSTimeStamp = 7 + GPSSatellites = 8 + GPSStatus = 9 + GPSMeasureMode = 10 + GPSDOP = 11 + GPSSpeedRef = 12 + GPSSpeed = 13 + GPSTrackRef = 14 + GPSTrack = 15 + GPSImgDirectionRef = 16 + GPSImgDirection = 17 + GPSMapDatum = 18 + GPSDestLatitudeRef = 19 + GPSDestLatitude = 20 + GPSDestLongitudeRef = 21 + GPSDestLongitude = 22 + GPSDestBearingRef = 23 + GPSDestBearing = 24 + GPSDestDistanceRef = 25 + GPSDestDistance = 26 + GPSProcessingMethod = 27 + GPSAreaInformation = 28 + GPSDateStamp = 29 + GPSDifferential = 30 + GPSHPositioningError = 31 GPSTAGS: Mapping[int, str] class Interop(IntEnum): - InteropIndex = ... - InteropVersion = ... - RelatedImageFileFormat = ... - RelatedImageWidth = ... - RleatedImageHeight = ... + InteropIndex = 1 + InteropVersion = 2 + RelatedImageFileFormat = 4096 + RelatedImageWidth = 4097 + RleatedImageHeight = 4098 class IFD(IntEnum): - Exif = ... - GPSInfo = ... - Makernote = ... - Interop = ... - IFD1 = ... + Exif = 34665 + GPSInfo = 34853 + Makernote = 37500 + Interop = 40965 + IFD1 = -1 class LightSource(IntEnum): - Unknown = ... - Daylight = ... - Fluorescent = ... - Tungsten = ... - Flash = ... - Fine = ... - Cloudy = ... - Shade = ... - DaylightFluorescent = ... - DayWhiteFluorescent = ... - CoolWhiteFluorescent = ... - WhiteFluorescent = ... - StandardLightA = ... - StandardLightB = ... - StandardLightC = ... - D55 = ... - D65 = ... - D75 = ... - D50 = ... - ISO = ... - Other = ... + Unknown = 0 + Daylight = 1 + Fluorescent = 2 + Tungsten = 3 + Flash = 4 + Fine = 9 + Cloudy = 10 + Shade = 11 + DaylightFluorescent = 12 + DayWhiteFluorescent = 13 + CoolWhiteFluorescent = 14 + WhiteFluorescent = 15 + StandardLightA = 17 + StandardLightB = 18 + StandardLightC = 19 + D55 = 20 + D65 = 21 + D75 = 22 + D50 = 23 + ISO = 24 + Other = 255 diff --git a/stubs/Pillow/PIL/FtexImagePlugin.pyi b/stubs/Pillow/PIL/FtexImagePlugin.pyi index a38b4da80f5b..d59c106775a2 100644 --- a/stubs/Pillow/PIL/FtexImagePlugin.pyi +++ b/stubs/Pillow/PIL/FtexImagePlugin.pyi @@ -6,8 +6,8 @@ from .ImageFile import ImageFile MAGIC: bytes class Format(IntEnum): - DXT1 = ... - UNCOMPRESSED = ... + DXT1 = 0 + UNCOMPRESSED = 1 class FtexImageFile(ImageFile): format: ClassVar[Literal["FTEX"]] diff --git a/stubs/Pillow/PIL/ImageCms.pyi b/stubs/Pillow/PIL/ImageCms.pyi index bbeeb1a2169a..85ab9f70c42c 100644 --- a/stubs/Pillow/PIL/ImageCms.pyi +++ b/stubs/Pillow/PIL/ImageCms.pyi @@ -9,15 +9,15 @@ VERSION: str core: Incomplete class Intent(IntEnum): - PERCEPTUAL = ... - RELATIVE_COLORIMETRIC = ... - SATURATION = ... - ABSOLUTE_COLORIMETRIC = ... + PERCEPTUAL = 0 + RELATIVE_COLORIMETRIC = 1 + SATURATION = 2 + ABSOLUTE_COLORIMETRIC = 3 class Direction(IntEnum): - INPUT = ... - OUTPUT = ... - PROOF = ... + INPUT = 0 + OUTPUT = 1 + PROOF = 2 FLAGS: Incomplete diff --git a/stubs/Pillow/PIL/PngImagePlugin.pyi b/stubs/Pillow/PIL/PngImagePlugin.pyi index 64355393da20..777526876621 100644 --- a/stubs/Pillow/PIL/PngImagePlugin.pyi +++ b/stubs/Pillow/PIL/PngImagePlugin.pyi @@ -10,13 +10,13 @@ MAX_TEXT_CHUNK: Incomplete MAX_TEXT_MEMORY: Incomplete class Disposal(IntEnum): - OP_NONE = ... - OP_BACKGROUND = ... - OP_PREVIOUS = ... + OP_NONE = 0 + OP_BACKGROUND = 1 + OP_PREVIOUS = 2 class Blend(IntEnum): - OP_SOURCE = ... - OP_OVER = ... + OP_SOURCE = 0 + OP_OVER = 1 class ChunkStream: fp: Incomplete diff --git a/stubs/aws-xray-sdk/aws_xray_sdk/core/sampling/reservoir.pyi b/stubs/aws-xray-sdk/aws_xray_sdk/core/sampling/reservoir.pyi index f45f7e057d69..9f20602bd993 100644 --- a/stubs/aws-xray-sdk/aws_xray_sdk/core/sampling/reservoir.pyi +++ b/stubs/aws-xray-sdk/aws_xray_sdk/core/sampling/reservoir.pyi @@ -10,6 +10,6 @@ class Reservoir: def TTL(self): ... class ReservoirDecision(Enum): - TAKE = ... - BORROW = ... - NO = ... + TAKE = 'take' + BORROW = 'borrow' + NO = 'no' diff --git a/stubs/fpdf2/fpdf/enums.pyi b/stubs/fpdf2/fpdf/enums.pyi index 6e61a8c5dfc9..1feadf252452 100644 --- a/stubs/fpdf2/fpdf/enums.pyi +++ b/stubs/fpdf2/fpdf/enums.pyi @@ -3,8 +3,8 @@ from typing import Literal from typing_extensions import Self class SignatureFlag(IntEnum): - SIGNATURES_EXIST = ... - APPEND_ONLY = ... + SIGNATURES_EXIST = 1 + APPEND_ONLY = 2 class CoerciveEnum(Enum): @classmethod diff --git a/stubs/pynput/pynput/mouse/_base.pyi b/stubs/pynput/pynput/mouse/_base.pyi index 0848b34d5264..18de43e741cf 100644 --- a/stubs/pynput/pynput/mouse/_base.pyi +++ b/stubs/pynput/pynput/mouse/_base.pyi @@ -8,10 +8,10 @@ from typing_extensions import Self from pynput._util import AbstractListener class Button(enum.Enum): - unknown = ... - left = ... - middle = ... - right = ... + unknown = 0 + left = 1 + middle = 2 + right = 3 if sys.platform == "linux": button8 = ... button9 = ... diff --git a/stubs/regex/regex/_regex_core.pyi b/stubs/regex/regex/_regex_core.pyi index e1b4ec971fab..6c002ddf420a 100644 --- a/stubs/regex/regex/_regex_core.pyi +++ b/stubs/regex/regex/_regex_core.pyi @@ -9,40 +9,40 @@ class error(Exception): def __init__(self, message: str, pattern: AnyStr | None = None, pos: int | None = None) -> None: ... class RegexFlag(enum.IntFlag): - A = ... - ASCII = ... - B = ... - BESTMATCH = ... - D = ... - DEBUG = ... - E = ... - ENHANCEMATCH = ... - F = ... - FULLCASE = ... - I = ... - IGNORECASE = ... - L = ... - LOCALE = ... - M = ... - MULTILINE = ... - P = ... - POSIX = ... - R = ... - REVERSE = ... - T = ... - TEMPLATE = ... - S = ... - DOTALL = ... - U = ... - UNICODE = ... - V0 = ... - VERSION0 = ... - V1 = ... - VERSION1 = ... - W = ... - WORD = ... - X = ... - VERBOSE = ... + A = 0x80 + ASCII = A + B = 0x1000 + BESTMATCH = B + D = 0x200 + DEBUG = D + E = 0x8000 + ENHANCEMATCH = E + F = 0x4000 + FULLCASE = F + I = 0x2 + IGNORECASE = I + L = 0x4 + LOCALE = L + M = 0x8 + MULTILINE = M + P = 0x10000 + POSIX = P + R = 0x400 + REVERSE = R + T = 0x1 + TEMPLATE = T + S = 0x10 + DOTALL = S + U = 0x20 + UNICODE = U + V0 = 0x2000 + VERSION0 = V0 + V1 = 0x100 + VERSION1 = V1 + W = 0x800 + WORD = W + X = 0x40 + VERBOSE = X A: int ASCII: int diff --git a/stubs/setuptools/setuptools/command/editable_wheel.pyi b/stubs/setuptools/setuptools/command/editable_wheel.pyi index 198f16c5507f..9ae1d0e6ed75 100644 --- a/stubs/setuptools/setuptools/command/editable_wheel.pyi +++ b/stubs/setuptools/setuptools/command/editable_wheel.pyi @@ -14,9 +14,9 @@ _WheelFile: TypeAlias = Incomplete _Path: TypeAlias = str | Path class _EditableMode(Enum): - STRICT = ... - LENIENT = ... - COMPAT = ... + STRICT = "strict" + LENIENT = "lenient" + COMPAT = "compat" @classmethod def convert(cls, mode: str | None) -> _EditableMode: ... From 9a8eafe6a3be7a35d68aaa4555c123f6c9219080 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 03:54:58 +0000 Subject: [PATCH 08/30] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/asyncio/locks.pyi | 8 ++++---- stdlib/http/__init__.pyi | 18 +++++++++--------- .../aws_xray_sdk/core/sampling/reservoir.pyi | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/stdlib/asyncio/locks.pyi b/stdlib/asyncio/locks.pyi index a22096e54c4a..a120edad9694 100644 --- a/stdlib/asyncio/locks.pyi +++ b/stdlib/asyncio/locks.pyi @@ -98,10 +98,10 @@ class BoundedSemaphore(Semaphore): ... if sys.version_info >= (3, 11): class _BarrierState(enum.Enum): # undocumented - FILLING = 'filling' - DRAINING = 'draining' - RESETTING = 'resetting' - BROKEN = 'broken' + FILLING = "filling" + DRAINING = "draining" + RESETTING = "resetting" + BROKEN = "broken" class Barrier(_LoopBoundMixin): def __init__(self, parties: int) -> None: ... diff --git a/stdlib/http/__init__.pyi b/stdlib/http/__init__.pyi index a56a080ffb0d..bb5737cc0481 100644 --- a/stdlib/http/__init__.pyi +++ b/stdlib/http/__init__.pyi @@ -94,12 +94,12 @@ if sys.version_info >= (3, 11): class HTTPMethod(StrEnum): @property def description(self) -> str: ... - CONNECT = 'CONNECT' - DELETE = 'DELETE' - GET = 'GET' - HEAD = 'HEAD' - OPTIONS = 'OPTIONS' - PATCH = 'PATCH' - POST = 'POST' - PUT = 'PUT' - TRACE = 'TRACE' + CONNECT = "CONNECT" + DELETE = "DELETE" + GET = "GET" + HEAD = "HEAD" + OPTIONS = "OPTIONS" + PATCH = "PATCH" + POST = "POST" + PUT = "PUT" + TRACE = "TRACE" diff --git a/stubs/aws-xray-sdk/aws_xray_sdk/core/sampling/reservoir.pyi b/stubs/aws-xray-sdk/aws_xray_sdk/core/sampling/reservoir.pyi index 9f20602bd993..e93d05f8b345 100644 --- a/stubs/aws-xray-sdk/aws_xray_sdk/core/sampling/reservoir.pyi +++ b/stubs/aws-xray-sdk/aws_xray_sdk/core/sampling/reservoir.pyi @@ -10,6 +10,6 @@ class Reservoir: def TTL(self): ... class ReservoirDecision(Enum): - TAKE = 'take' - BORROW = 'borrow' - NO = 'no' + TAKE = "take" + BORROW = "borrow" + NO = "no" From 71be421ad74fdd301dfd119f2077b164b549c6e2 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sun, 21 Jan 2024 20:00:39 -0800 Subject: [PATCH 09/30] More fixes from test results --- stdlib/inspect.pyi | 38 +++++++++++++++++++------------------- stdlib/ssl.pyi | 4 ++-- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/stdlib/inspect.pyi b/stdlib/inspect.pyi index a83b31ee647f..ff3dad2daed6 100644 --- a/stdlib/inspect.pyi +++ b/stdlib/inspect.pyi @@ -610,22 +610,22 @@ if sys.version_info >= (3, 9): if sys.version_info >= (3, 12): class BufferFlags(enum.IntFlag): - SIMPLE = 0x0 - WRITABLE = 0x1 - FORMAT = 0x4 - ND = 0x8 - STRIDES = 0x10 | ND - C_CONTIGUOUS = 0x20 | STRIDES - F_CONTIGUOUS = 0x40 | STRIDES - ANY_CONTIGUOUS = 0x80 | STRIDES - INDIRECT = 0x100 | STRIDES - CONTIG = ND | WRITABLE - CONTIG_RO = ND - STRIDED = STRIDES | WRITABLE - STRIDED_RO = STRIDES - RECORDS = STRIDES | WRITABLE | FORMAT - RECORDS_RO = STRIDES | FORMAT - FULL = INDIRECT | WRITABLE | FORMAT - FULL_RO = INDIRECT | FORMAT - READ = 0x100 - WRITE = 0x200 + SIMPLE = 0 + WRITABLE = 1 + FORMAT = 4 + ND = 8 + STRIDES = 24 + C_CONTIGUOUS = 56 + F_CONTIGUOUS = 88 + ANY_CONTIGUOUS = 152 + INDIRECT = 280 + CONTIG = 9 + CONTIG_RO = 8 + STRIDED = 25 + STRIDED_RO = 24 + RECORDS = 29 + RECORDS_RO = 28 + FULL = 285 + FULL_RO = 284 + READ = 256 + WRITE = 512 diff --git a/stdlib/ssl.pyi b/stdlib/ssl.pyi index 2f0295c68269..6a9879b66a98 100644 --- a/stdlib/ssl.pyi +++ b/stdlib/ssl.pyi @@ -314,8 +314,8 @@ class _ASN1Object(_ASN1ObjectBase): def fromname(cls, name: str) -> Self: ... class Purpose(_ASN1Object, enum.Enum): - SERVER_AUTH = ... - CLIENT_AUTH = ... + SERVER_AUTH = 129 + CLIENT_AUTH = 130 class SSLSocket(socket.socket): context: SSLContext From ed15ebd7d5323ddca9b679d5996d349d8072b635 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sun, 21 Jan 2024 20:11:29 -0800 Subject: [PATCH 10/30] More fixes --- stdlib/socket.pyi | 21 ++++++++++++--------- stdlib/ssl.pyi | 4 ++-- stubs/pika/pika/delivery_mode.pyi | 4 ++-- stubs/pika/pika/exchange_type.pyi | 8 ++++---- stubs/psutil/psutil/_pswindows.pyi | 20 ++++++++++---------- 5 files changed, 30 insertions(+), 27 deletions(-) diff --git a/stdlib/socket.pyi b/stdlib/socket.pyi index 7db42b854978..0b88cfb92a1c 100644 --- a/stdlib/socket.pyi +++ b/stdlib/socket.pyi @@ -520,11 +520,14 @@ class AddressFamily(IntEnum): AF_VSOCK = 40 AF_QIPCRTR = 42 if sys.platform != "win32" or sys.version_info >= (3, 9): - AF_LINK = ... + if sys.platform != "win32" + AF_LINK = 33 + else: + AF_LINK = 18 if sys.platform != "darwin": - AF_BLUETOOTH = ... + AF_BLUETOOTH = 32 if sys.platform == "win32" and sys.version_info >= (3, 12): - AF_HYPERV = ... + AF_HYPERV = 34 AF_INET = AddressFamily.AF_INET AF_INET6 = AddressFamily.AF_INET6 @@ -606,8 +609,8 @@ class MsgFlag(IntFlag): MSG_WAITALL = 256 if sys.platform != "darwin": - MSG_BCAST = ... - MSG_MCAST = ... + MSG_BCAST = 1024 + MSG_MCAST = 2048 MSG_ERRQUEUE = 8192 if sys.platform != "win32" and sys.platform != "darwin": @@ -621,7 +624,7 @@ class MsgFlag(IntFlag): if sys.platform != "win32": MSG_DONTWAIT = 64 - MSG_EOF = ... + MSG_EOF = 256 MSG_EOR = 128 MSG_NOSIGNAL = 16384 # sometimes this exists on darwin, sometimes not @@ -661,9 +664,9 @@ class AddressInfo(IntFlag): AI_PASSIVE = 1 AI_V4MAPPED = 8 if sys.platform != "win32": - AI_DEFAULT = ... - AI_MASK = ... - AI_V4MAPPED_CFG = ... + AI_DEFAULT = 1536 + AI_MASK = 5127 + AI_V4MAPPED_CFG = 512 AI_ADDRCONFIG = AddressInfo.AI_ADDRCONFIG AI_ALL = AddressInfo.AI_ALL diff --git a/stdlib/ssl.pyi b/stdlib/ssl.pyi index 6a9879b66a98..cc1c4aef60ee 100644 --- a/stdlib/ssl.pyi +++ b/stdlib/ssl.pyi @@ -314,8 +314,8 @@ class _ASN1Object(_ASN1ObjectBase): def fromname(cls, name: str) -> Self: ... class Purpose(_ASN1Object, enum.Enum): - SERVER_AUTH = 129 - CLIENT_AUTH = 130 + SERVER_AUTH = '1.3.6.1.5.5.7.3.1' + CLIENT_AUTH = '1.3.6.1.5.5.7.3.2' class SSLSocket(socket.socket): context: SSLContext diff --git a/stubs/pika/pika/delivery_mode.pyi b/stubs/pika/pika/delivery_mode.pyi index 0896ecc5ebe9..61d5aa5c4237 100644 --- a/stubs/pika/pika/delivery_mode.pyi +++ b/stubs/pika/pika/delivery_mode.pyi @@ -1,5 +1,5 @@ from enum import Enum class DeliveryMode(Enum): - Transient = ... - Persistent = ... + Transient = 1 + Persistent = 2 diff --git a/stubs/pika/pika/exchange_type.pyi b/stubs/pika/pika/exchange_type.pyi index c149d114ac0c..48ea503e6789 100644 --- a/stubs/pika/pika/exchange_type.pyi +++ b/stubs/pika/pika/exchange_type.pyi @@ -1,7 +1,7 @@ from enum import Enum class ExchangeType(Enum): - direct = ... - fanout = ... - headers = ... - topic = ... + direct = 'direct' + fanout = 'fanout' + headers = 'headers' + topic = 'topic' diff --git a/stubs/psutil/psutil/_pswindows.pyi b/stubs/psutil/psutil/_pswindows.pyi index a817f61f816d..8dde5d5d7902 100644 --- a/stubs/psutil/psutil/_pswindows.pyi +++ b/stubs/psutil/psutil/_pswindows.pyi @@ -36,12 +36,12 @@ AddressFamily: Any TCP_STATUSES: Any class Priority(enum.IntEnum): - ABOVE_NORMAL_PRIORITY_CLASS = ... - BELOW_NORMAL_PRIORITY_CLASS = ... - HIGH_PRIORITY_CLASS = ... - IDLE_PRIORITY_CLASS = ... - NORMAL_PRIORITY_CLASS = ... - REALTIME_PRIORITY_CLASS = ... + ABOVE_NORMAL_PRIORITY_CLASS = 32768 + BELOW_NORMAL_PRIORITY_CLASS = 16384 + HIGH_PRIORITY_CLASS = 128 + IDLE_PRIORITY_CLASS = 64 + NORMAL_PRIORITY_CLASS = 32 + REALTIME_PRIORITY_CLASS = 256 IOPRIO_VERYLOW: int IOPRIO_LOW: int @@ -49,10 +49,10 @@ IOPRIO_NORMAL: int IOPRIO_HIGH: int class IOPriority(enum.IntEnum): - IOPRIO_VERYLOW = ... - IOPRIO_LOW = ... - IOPRIO_NORMAL = ... - IOPRIO_HIGH = ... + IOPRIO_VERYLOW = 0 + IOPRIO_LOW = 1 + IOPRIO_NORMAL = 2 + IOPRIO_HIGH = 3 pinfo_map: Any From 4c84746fd602664c701bc4bb0cba35c5ac73f1bc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 04:12:12 +0000 Subject: [PATCH 11/30] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/ssl.pyi | 4 ++-- stubs/pika/pika/exchange_type.pyi | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stdlib/ssl.pyi b/stdlib/ssl.pyi index cc1c4aef60ee..f4c2e7e8bb52 100644 --- a/stdlib/ssl.pyi +++ b/stdlib/ssl.pyi @@ -314,8 +314,8 @@ class _ASN1Object(_ASN1ObjectBase): def fromname(cls, name: str) -> Self: ... class Purpose(_ASN1Object, enum.Enum): - SERVER_AUTH = '1.3.6.1.5.5.7.3.1' - CLIENT_AUTH = '1.3.6.1.5.5.7.3.2' + SERVER_AUTH = "1.3.6.1.5.5.7.3.1" + CLIENT_AUTH = "1.3.6.1.5.5.7.3.2" class SSLSocket(socket.socket): context: SSLContext diff --git a/stubs/pika/pika/exchange_type.pyi b/stubs/pika/pika/exchange_type.pyi index 48ea503e6789..ef55b20411f3 100644 --- a/stubs/pika/pika/exchange_type.pyi +++ b/stubs/pika/pika/exchange_type.pyi @@ -1,7 +1,7 @@ from enum import Enum class ExchangeType(Enum): - direct = 'direct' - fanout = 'fanout' - headers = 'headers' - topic = 'topic' + direct = "direct" + fanout = "fanout" + headers = "headers" + topic = "topic" From 16f497132f1a134dcbb41329c87b55dac801b679 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sun, 21 Jan 2024 20:15:49 -0800 Subject: [PATCH 12/30] Tests really didn't like that change --- stdlib/socket.pyi | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/stdlib/socket.pyi b/stdlib/socket.pyi index 0b88cfb92a1c..093f1e443264 100644 --- a/stdlib/socket.pyi +++ b/stdlib/socket.pyi @@ -520,10 +520,7 @@ class AddressFamily(IntEnum): AF_VSOCK = 40 AF_QIPCRTR = 42 if sys.platform != "win32" or sys.version_info >= (3, 9): - if sys.platform != "win32" - AF_LINK = 33 - else: - AF_LINK = 18 + AF_LINK = 33 if sys.platform != "darwin": AF_BLUETOOTH = 32 if sys.platform == "win32" and sys.version_info >= (3, 12): From 18480de70c669191d232f3222ee1fdc656eeb94d Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Wed, 10 Apr 2024 15:28:52 -0700 Subject: [PATCH 13/30] Added missing enum values to recently-added stubs. --- stubs/fpdf2/fpdf/enums.pyi | 322 +++++++++--------- .../client/flux_csv_parser.pyi | 10 +- .../influxdb_client/client/write_api.pyi | 6 +- stubs/psutil/psutil/_pslinux.pyi | 8 +- 4 files changed, 173 insertions(+), 173 deletions(-) diff --git a/stubs/fpdf2/fpdf/enums.pyi b/stubs/fpdf2/fpdf/enums.pyi index cff674a22157..026b7042ad20 100644 --- a/stubs/fpdf2/fpdf/enums.pyi +++ b/stubs/fpdf2/fpdf/enums.pyi @@ -19,55 +19,55 @@ class CoerciveIntFlag(IntFlag): def coerce(cls, value: Self | str | int) -> Self: ... class WrapMode(CoerciveEnum): - WORD = ... - CHAR = ... + WORD = 'WORD' + CHAR = 'CHAR' class CharVPos(CoerciveEnum): - SUP = ... - SUB = ... - NOM = ... - DENOM = ... - LINE = ... + SUP = 'SUP' + SUB = 'SUB' + NOM = 'NOM' + DENOM = 'DENOM' + LINE = 'LINE' class Align(CoerciveEnum): - C = ... - X = ... - L = ... - R = ... - J = ... + C = 'CENTER' + X = 'X_CENTER' + L = 'LEFT' + R = 'RIGHT' + J = 'JUSTIFY' class VAlign(CoerciveEnum): - M = ... - T = ... - B = ... + M = 'MIDDLE' + T = 'TOP' + B = 'BOTTOM' class TextEmphasis(CoerciveIntFlag): - B = ... - I = ... - U = ... + B = 1 + I = 2 + U = 4 @property def style(self) -> str: ... class MethodReturnValue(CoerciveIntFlag): - PAGE_BREAK = ... - LINES = ... - HEIGHT = ... + PAGE_BREAK = 1 + LINES = 2 + HEIGHT = 4 class TableBordersLayout(CoerciveEnum): - ALL = ... - NONE = ... - INTERNAL = ... - MINIMAL = ... - HORIZONTAL_LINES = ... - NO_HORIZONTAL_LINES = ... - SINGLE_TOP_LINE = ... + ALL = 'ALL' + NONE = 'NONE' + INTERNAL = 'INTERNAL' + MINIMAL = 'MINIMAL' + HORIZONTAL_LINES = 'HORIZONTAL_LINES' + NO_HORIZONTAL_LINES = 'NO_HORIZONTAL_LINES' + SINGLE_TOP_LINE = 'SINGLE_TOP_LINE' class TableCellFillMode(CoerciveEnum): - NONE = ... - ALL = ... - ROWS = ... - COLUMNS = ... + NONE = 'NONE' + ALL = 'ALL' + ROWS = 'ROWS' + COLUMNS = 'COLUMNS' def should_fill_cell(self, i: int, j: int) -> bool: ... @@ -76,9 +76,9 @@ class TableSpan(CoerciveEnum): COL: Literal["COL"] class RenderStyle(CoerciveEnum): - D = ... - F = ... - DF = ... + D = 'DRAW' + F = 'FILL' + DF = 'DRAW_FILL' @property def operator(self) -> str: ... @property @@ -87,173 +87,173 @@ class RenderStyle(CoerciveEnum): def is_fill(self) -> bool: ... class TextMode(CoerciveIntEnum): - FILL = ... - STROKE = ... - FILL_STROKE = ... - INVISIBLE = ... - FILL_CLIP = ... - STROKE_CLIP = ... - FILL_STROKE_CLIP = ... - CLIP = ... + FILL = 0 + STROKE = 1 + FILL_STROKE = 2 + INVISIBLE = 3 + FILL_CLIP = 4 + STROKE_CLIP = 5 + FILL_STROKE_CLIP = 6 + CLIP = 7 class XPos(CoerciveEnum): - LEFT = ... - RIGHT = ... - START = ... - END = ... - WCONT = ... - CENTER = ... - LMARGIN = ... - RMARGIN = ... + LEFT = 'LEFT' + RIGHT = 'RIGHT' + START = 'START' + END = 'END' + WCONT = 'WCONT' + CENTER = 'CENTER' + LMARGIN = 'LMARGIN' + RMARGIN = 'RMARGIN' class YPos(CoerciveEnum): - TOP = ... - LAST = ... - NEXT = ... - TMARGIN = ... - BMARGIN = ... + TOP = 'TOP' + LAST = 'LAST' + NEXT = 'NEXT' + TMARGIN = 'TMARGIN' + BMARGIN = 'BMARGIN' class Angle(CoerciveIntEnum): - NORTH = ... - EAST = ... - SOUTH = ... - WEST = ... - NORTHEAST = ... - SOUTHEAST = ... - SOUTHWEST = ... - NORTHWEST = ... + NORTH = 90 + EAST = 0 + SOUTH = 270 + WEST = 180 + NORTHEAST = 45 + SOUTHEAST = 315 + SOUTHWEST = 225 + NORTHWEST = 135 class PageLayout(CoerciveEnum): - SINGLE_PAGE = ... - ONE_COLUMN = ... - TWO_COLUMN_LEFT = ... - TWO_COLUMN_RIGHT = ... - TWO_PAGE_LEFT = ... - TWO_PAGE_RIGHT = ... + SINGLE_PAGE = 'SinglePage' + ONE_COLUMN = 'OneColumn' + TWO_COLUMN_LEFT = 'TwoColumnLeft' + TWO_COLUMN_RIGHT = 'TwoColumnRight' + TWO_PAGE_LEFT = 'TwoPageLeft' + TWO_PAGE_RIGHT = 'TwoPageRight' class PageMode(CoerciveEnum): - USE_NONE = ... - USE_OUTLINES = ... - USE_THUMBS = ... - FULL_SCREEN = ... - USE_OC = ... - USE_ATTACHMENTS = ... + USE_NONE = 'UseNone' + USE_OUTLINES = 'UseOutlines' + USE_THUMBS = 'UseThumbs' + FULL_SCREEN = 'FullScreen' + USE_OC = 'UseOC' + USE_ATTACHMENTS = 'UseAttachments' class TextMarkupType(CoerciveEnum): - HIGHLIGHT = ... - UNDERLINE = ... - SQUIGGLY = ... - STRIKE_OUT = ... + HIGHLIGHT = 'Highlight' + UNDERLINE = 'Underline' + SQUIGGLY = 'Squiggly' + STRIKE_OUT = 'StrikeOut' class BlendMode(CoerciveEnum): - NORMAL = ... - MULTIPLY = ... - SCREEN = ... - OVERLAY = ... - DARKEN = ... - LIGHTEN = ... - COLOR_DODGE = ... - COLOR_BURN = ... - HARD_LIGHT = ... - SOFT_LIGHT = ... - DIFFERENCE = ... - EXCLUSION = ... - HUE = ... - SATURATION = ... - COLOR = ... - LUMINOSITY = ... + NORMAL = 'Normal' + MULTIPLY = 'Multiply' + SCREEN = 'Screen' + OVERLAY = 'Overlay' + DARKEN = 'Darken' + LIGHTEN = 'Lighten' + COLOR_DODGE = 'ColorDodge' + COLOR_BURN = 'ColorBurn' + HARD_LIGHT = 'HardLight' + SOFT_LIGHT = 'SoftLight' + DIFFERENCE = 'Difference' + EXCLUSION = 'Exclusion' + HUE = 'Hue' + SATURATION = 'Saturation' + COLOR = 'Color' + LUMINOSITY = 'Luminosity' class AnnotationFlag(CoerciveIntEnum): - INVISIBLE = ... - HIDDEN = ... - PRINT = ... - NO_ZOOM = ... - NO_ROTATE = ... - NO_VIEW = ... - READ_ONLY = ... - LOCKED = ... - TOGGLE_NO_VIEW = ... - LOCKED_CONTENTS = ... + INVISIBLE = 1 + HIDDEN = 2 + PRINT = 4 + NO_ZOOM = 8 + NO_ROTATE = 16 + NO_VIEW = 32 + READ_ONLY = 64 + LOCKED = 128 + TOGGLE_NO_VIEW = 256 + LOCKED_CONTENTS = 512 class AnnotationName(CoerciveEnum): - NOTE = ... - COMMENT = ... - HELP = ... - PARAGRAPH = ... - NEW_PARAGRAPH = ... - INSERT = ... + NOTE = 'Note' + COMMENT = 'Comment' + HELP = 'Help' + PARAGRAPH = 'Paragraph' + NEW_PARAGRAPH = 'NewParagraph' + INSERT = 'Insert' class FileAttachmentAnnotationName(CoerciveEnum): - PUSH_PIN = ... - GRAPH_PUSH_PIN = ... - PAPERCLIP_TAG = ... + PUSH_PIN = 'PushPin' + GRAPH_PUSH_PIN = 'GraphPushPin' + PAPERCLIP_TAG = 'PaperclipTag' class IntersectionRule(CoerciveEnum): - NONZERO = ... - EVENODD = ... + NONZERO = 'nonzero' + EVENODD = 'evenodd' class PathPaintRule(CoerciveEnum): - STROKE = ... - FILL_NONZERO = ... - FILL_EVENODD = ... - STROKE_FILL_NONZERO = ... - STROKE_FILL_EVENODD = ... - DONT_PAINT = ... - AUTO = ... + STROKE = 'S' + FILL_NONZERO = 'f' + FILL_EVENODD = 'f*' + STROKE_FILL_NONZERO = 'B' + STROKE_FILL_EVENODD = 'B*' + DONT_PAINT = 'n' + AUTO = 'auto' class ClippingPathIntersectionRule(CoerciveEnum): - NONZERO = ... - EVENODD = ... + NONZERO = 'W' + EVENODD = 'W*' class StrokeCapStyle(CoerciveIntEnum): - BUTT = ... - ROUND = ... - SQUARE = ... + BUTT = 0 + ROUND = 1 + SQUARE = 2 class StrokeJoinStyle(CoerciveIntEnum): - MITER = ... - ROUND = ... - BEVEL = ... + MITER = 0 + ROUND = 1 + BEVEL = 2 class PDFStyleKeys(Enum): - FILL_ALPHA = ... - BLEND_MODE = ... - STROKE_ALPHA = ... - STROKE_ADJUSTMENT = ... - STROKE_WIDTH = ... - STROKE_CAP_STYLE = ... - STROKE_JOIN_STYLE = ... - STROKE_MITER_LIMIT = ... - STROKE_DASH_PATTERN = ... + FILL_ALPHA = 'ca' + BLEND_MODE = 'BM' + STROKE_ALPHA = 'CA' + STROKE_ADJUSTMENT = 'SA' + STROKE_WIDTH = 'LW' + STROKE_CAP_STYLE = 'LC' + STROKE_JOIN_STYLE = 'LJ' + STROKE_MITER_LIMIT = 'ML' + STROKE_DASH_PATTERN = 'D' class Corner(CoerciveEnum): - TOP_RIGHT = ... - TOP_LEFT = ... - BOTTOM_RIGHT = ... - BOTTOM_LEFT = ... + TOP_RIGHT = 'TOP_RIGHT' + TOP_LEFT = 'TOP_LEFT' + BOTTOM_RIGHT = 'BOTTOM_RIGHT' + BOTTOM_LEFT = 'BOTTOM_LEFT' class FontDescriptorFlags(Flag): - FIXED_PITCH = ... - SYMBOLIC = ... - ITALIC = ... - FORCE_BOLD = ... + FIXED_PITCH = 1 + SYMBOLIC = 4 + ITALIC = 64 + FORCE_BOLD = 262144 class AccessPermission(IntFlag): - PRINT_LOW_RES = ... - MODIFY = ... - COPY = ... - ANNOTATION = ... - FILL_FORMS = ... - COPY_FOR_ACCESSIBILITY = ... - ASSEMBLE = ... - PRINT_HIGH_RES = ... + PRINT_LOW_RES = 4 + MODIFY = 8 + COPY = 16 + ANNOTATION = 32 + FILL_FORMS = 256 + COPY_FOR_ACCESSIBILITY = 512 + ASSEMBLE = 1024 + PRINT_HIGH_RES = 2048 @classmethod def all(cls) -> int: ... @classmethod def none(cls) -> Literal[0]: ... class EncryptionMethod(Enum): - NO_ENCRYPTION = ... - RC4 = ... - AES_128 = ... - AES_256 = ... + NO_ENCRYPTION = 0 + RC4 = 1 + AES_128 = 2 + AES_256 = 3 diff --git a/stubs/influxdb-client/influxdb_client/client/flux_csv_parser.pyi b/stubs/influxdb-client/influxdb_client/client/flux_csv_parser.pyi index 3f52510807b1..8091fa70659b 100644 --- a/stubs/influxdb-client/influxdb_client/client/flux_csv_parser.pyi +++ b/stubs/influxdb-client/influxdb_client/client/flux_csv_parser.pyi @@ -19,13 +19,13 @@ class FluxQueryException(Exception): class FluxCsvParserException(Exception): ... class FluxSerializationMode(Enum): - tables = ... - stream = ... - dataFrame = ... + tables = 1 + stream = 2 + dataFrame = 3 class FluxResponseMetadataMode(Enum): - full = ... - only_names = ... + full = 1 + only_names = 2 class _FluxCsvParserMetadata: table_index: int diff --git a/stubs/influxdb-client/influxdb_client/client/write_api.pyi b/stubs/influxdb-client/influxdb_client/client/write_api.pyi index 6138a6ce4eed..a753472c320a 100644 --- a/stubs/influxdb-client/influxdb_client/client/write_api.pyi +++ b/stubs/influxdb-client/influxdb_client/client/write_api.pyi @@ -17,9 +17,9 @@ _Observable: TypeAlias = Any # reactivex.Observable logger: logging.Logger class WriteType(Enum): - batching = ... - asynchronous = ... - synchronous = ... + batching = 1 + asynchronous = 2 + synchronous = 3 class WriteOptions: write_type: WriteType diff --git a/stubs/psutil/psutil/_pslinux.pyi b/stubs/psutil/psutil/_pslinux.pyi index 8e3893ad6753..3e390fda7075 100644 --- a/stubs/psutil/psutil/_pslinux.pyi +++ b/stubs/psutil/psutil/_pslinux.pyi @@ -36,10 +36,10 @@ IOPRIO_CLASS_BE: int IOPRIO_CLASS_IDLE: int class IOPriority(enum.IntEnum): - IOPRIO_CLASS_NONE = ... - IOPRIO_CLASS_RT = ... - IOPRIO_CLASS_BE = ... - IOPRIO_CLASS_IDLE = ... + IOPRIO_CLASS_NONE = 0 + IOPRIO_CLASS_RT = 1 + IOPRIO_CLASS_BE = 2 + IOPRIO_CLASS_IDLE = 3 PROC_STATUSES: Any TCP_STATUSES: Any From 1e54df7a7654a9e2de9739264359b7f7d3ff9404 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 22:30:25 +0000 Subject: [PATCH 14/30] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stubs/fpdf2/fpdf/enums.pyi | 214 ++++++++++++++++++------------------- 1 file changed, 107 insertions(+), 107 deletions(-) diff --git a/stubs/fpdf2/fpdf/enums.pyi b/stubs/fpdf2/fpdf/enums.pyi index 026b7042ad20..897fbd9697da 100644 --- a/stubs/fpdf2/fpdf/enums.pyi +++ b/stubs/fpdf2/fpdf/enums.pyi @@ -19,27 +19,27 @@ class CoerciveIntFlag(IntFlag): def coerce(cls, value: Self | str | int) -> Self: ... class WrapMode(CoerciveEnum): - WORD = 'WORD' - CHAR = 'CHAR' + WORD = "WORD" + CHAR = "CHAR" class CharVPos(CoerciveEnum): - SUP = 'SUP' - SUB = 'SUB' - NOM = 'NOM' - DENOM = 'DENOM' - LINE = 'LINE' + SUP = "SUP" + SUB = "SUB" + NOM = "NOM" + DENOM = "DENOM" + LINE = "LINE" class Align(CoerciveEnum): - C = 'CENTER' - X = 'X_CENTER' - L = 'LEFT' - R = 'RIGHT' - J = 'JUSTIFY' + C = "CENTER" + X = "X_CENTER" + L = "LEFT" + R = "RIGHT" + J = "JUSTIFY" class VAlign(CoerciveEnum): - M = 'MIDDLE' - T = 'TOP' - B = 'BOTTOM' + M = "MIDDLE" + T = "TOP" + B = "BOTTOM" class TextEmphasis(CoerciveIntFlag): B = 1 @@ -55,19 +55,19 @@ class MethodReturnValue(CoerciveIntFlag): HEIGHT = 4 class TableBordersLayout(CoerciveEnum): - ALL = 'ALL' - NONE = 'NONE' - INTERNAL = 'INTERNAL' - MINIMAL = 'MINIMAL' - HORIZONTAL_LINES = 'HORIZONTAL_LINES' - NO_HORIZONTAL_LINES = 'NO_HORIZONTAL_LINES' - SINGLE_TOP_LINE = 'SINGLE_TOP_LINE' + ALL = "ALL" + NONE = "NONE" + INTERNAL = "INTERNAL" + MINIMAL = "MINIMAL" + HORIZONTAL_LINES = "HORIZONTAL_LINES" + NO_HORIZONTAL_LINES = "NO_HORIZONTAL_LINES" + SINGLE_TOP_LINE = "SINGLE_TOP_LINE" class TableCellFillMode(CoerciveEnum): - NONE = 'NONE' - ALL = 'ALL' - ROWS = 'ROWS' - COLUMNS = 'COLUMNS' + NONE = "NONE" + ALL = "ALL" + ROWS = "ROWS" + COLUMNS = "COLUMNS" def should_fill_cell(self, i: int, j: int) -> bool: ... @@ -76,9 +76,9 @@ class TableSpan(CoerciveEnum): COL: Literal["COL"] class RenderStyle(CoerciveEnum): - D = 'DRAW' - F = 'FILL' - DF = 'DRAW_FILL' + D = "DRAW" + F = "FILL" + DF = "DRAW_FILL" @property def operator(self) -> str: ... @property @@ -97,21 +97,21 @@ class TextMode(CoerciveIntEnum): CLIP = 7 class XPos(CoerciveEnum): - LEFT = 'LEFT' - RIGHT = 'RIGHT' - START = 'START' - END = 'END' - WCONT = 'WCONT' - CENTER = 'CENTER' - LMARGIN = 'LMARGIN' - RMARGIN = 'RMARGIN' + LEFT = "LEFT" + RIGHT = "RIGHT" + START = "START" + END = "END" + WCONT = "WCONT" + CENTER = "CENTER" + LMARGIN = "LMARGIN" + RMARGIN = "RMARGIN" class YPos(CoerciveEnum): - TOP = 'TOP' - LAST = 'LAST' - NEXT = 'NEXT' - TMARGIN = 'TMARGIN' - BMARGIN = 'BMARGIN' + TOP = "TOP" + LAST = "LAST" + NEXT = "NEXT" + TMARGIN = "TMARGIN" + BMARGIN = "BMARGIN" class Angle(CoerciveIntEnum): NORTH = 90 @@ -124,44 +124,44 @@ class Angle(CoerciveIntEnum): NORTHWEST = 135 class PageLayout(CoerciveEnum): - SINGLE_PAGE = 'SinglePage' - ONE_COLUMN = 'OneColumn' - TWO_COLUMN_LEFT = 'TwoColumnLeft' - TWO_COLUMN_RIGHT = 'TwoColumnRight' - TWO_PAGE_LEFT = 'TwoPageLeft' - TWO_PAGE_RIGHT = 'TwoPageRight' + SINGLE_PAGE = "SinglePage" + ONE_COLUMN = "OneColumn" + TWO_COLUMN_LEFT = "TwoColumnLeft" + TWO_COLUMN_RIGHT = "TwoColumnRight" + TWO_PAGE_LEFT = "TwoPageLeft" + TWO_PAGE_RIGHT = "TwoPageRight" class PageMode(CoerciveEnum): - USE_NONE = 'UseNone' - USE_OUTLINES = 'UseOutlines' - USE_THUMBS = 'UseThumbs' - FULL_SCREEN = 'FullScreen' - USE_OC = 'UseOC' - USE_ATTACHMENTS = 'UseAttachments' + USE_NONE = "UseNone" + USE_OUTLINES = "UseOutlines" + USE_THUMBS = "UseThumbs" + FULL_SCREEN = "FullScreen" + USE_OC = "UseOC" + USE_ATTACHMENTS = "UseAttachments" class TextMarkupType(CoerciveEnum): - HIGHLIGHT = 'Highlight' - UNDERLINE = 'Underline' - SQUIGGLY = 'Squiggly' - STRIKE_OUT = 'StrikeOut' + HIGHLIGHT = "Highlight" + UNDERLINE = "Underline" + SQUIGGLY = "Squiggly" + STRIKE_OUT = "StrikeOut" class BlendMode(CoerciveEnum): - NORMAL = 'Normal' - MULTIPLY = 'Multiply' - SCREEN = 'Screen' - OVERLAY = 'Overlay' - DARKEN = 'Darken' - LIGHTEN = 'Lighten' - COLOR_DODGE = 'ColorDodge' - COLOR_BURN = 'ColorBurn' - HARD_LIGHT = 'HardLight' - SOFT_LIGHT = 'SoftLight' - DIFFERENCE = 'Difference' - EXCLUSION = 'Exclusion' - HUE = 'Hue' - SATURATION = 'Saturation' - COLOR = 'Color' - LUMINOSITY = 'Luminosity' + NORMAL = "Normal" + MULTIPLY = "Multiply" + SCREEN = "Screen" + OVERLAY = "Overlay" + DARKEN = "Darken" + LIGHTEN = "Lighten" + COLOR_DODGE = "ColorDodge" + COLOR_BURN = "ColorBurn" + HARD_LIGHT = "HardLight" + SOFT_LIGHT = "SoftLight" + DIFFERENCE = "Difference" + EXCLUSION = "Exclusion" + HUE = "Hue" + SATURATION = "Saturation" + COLOR = "Color" + LUMINOSITY = "Luminosity" class AnnotationFlag(CoerciveIntEnum): INVISIBLE = 1 @@ -176,34 +176,34 @@ class AnnotationFlag(CoerciveIntEnum): LOCKED_CONTENTS = 512 class AnnotationName(CoerciveEnum): - NOTE = 'Note' - COMMENT = 'Comment' - HELP = 'Help' - PARAGRAPH = 'Paragraph' - NEW_PARAGRAPH = 'NewParagraph' - INSERT = 'Insert' + NOTE = "Note" + COMMENT = "Comment" + HELP = "Help" + PARAGRAPH = "Paragraph" + NEW_PARAGRAPH = "NewParagraph" + INSERT = "Insert" class FileAttachmentAnnotationName(CoerciveEnum): - PUSH_PIN = 'PushPin' - GRAPH_PUSH_PIN = 'GraphPushPin' - PAPERCLIP_TAG = 'PaperclipTag' + PUSH_PIN = "PushPin" + GRAPH_PUSH_PIN = "GraphPushPin" + PAPERCLIP_TAG = "PaperclipTag" class IntersectionRule(CoerciveEnum): - NONZERO = 'nonzero' - EVENODD = 'evenodd' + NONZERO = "nonzero" + EVENODD = "evenodd" class PathPaintRule(CoerciveEnum): - STROKE = 'S' - FILL_NONZERO = 'f' - FILL_EVENODD = 'f*' - STROKE_FILL_NONZERO = 'B' - STROKE_FILL_EVENODD = 'B*' - DONT_PAINT = 'n' - AUTO = 'auto' + STROKE = "S" + FILL_NONZERO = "f" + FILL_EVENODD = "f*" + STROKE_FILL_NONZERO = "B" + STROKE_FILL_EVENODD = "B*" + DONT_PAINT = "n" + AUTO = "auto" class ClippingPathIntersectionRule(CoerciveEnum): - NONZERO = 'W' - EVENODD = 'W*' + NONZERO = "W" + EVENODD = "W*" class StrokeCapStyle(CoerciveIntEnum): BUTT = 0 @@ -216,21 +216,21 @@ class StrokeJoinStyle(CoerciveIntEnum): BEVEL = 2 class PDFStyleKeys(Enum): - FILL_ALPHA = 'ca' - BLEND_MODE = 'BM' - STROKE_ALPHA = 'CA' - STROKE_ADJUSTMENT = 'SA' - STROKE_WIDTH = 'LW' - STROKE_CAP_STYLE = 'LC' - STROKE_JOIN_STYLE = 'LJ' - STROKE_MITER_LIMIT = 'ML' - STROKE_DASH_PATTERN = 'D' + FILL_ALPHA = "ca" + BLEND_MODE = "BM" + STROKE_ALPHA = "CA" + STROKE_ADJUSTMENT = "SA" + STROKE_WIDTH = "LW" + STROKE_CAP_STYLE = "LC" + STROKE_JOIN_STYLE = "LJ" + STROKE_MITER_LIMIT = "ML" + STROKE_DASH_PATTERN = "D" class Corner(CoerciveEnum): - TOP_RIGHT = 'TOP_RIGHT' - TOP_LEFT = 'TOP_LEFT' - BOTTOM_RIGHT = 'BOTTOM_RIGHT' - BOTTOM_LEFT = 'BOTTOM_LEFT' + TOP_RIGHT = "TOP_RIGHT" + TOP_LEFT = "TOP_LEFT" + BOTTOM_RIGHT = "BOTTOM_RIGHT" + BOTTOM_LEFT = "BOTTOM_LEFT" class FontDescriptorFlags(Flag): FIXED_PITCH = 1 From 4819fe2669685382e0e52f2d1683753e97440a45 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Wed, 10 Apr 2024 15:42:20 -0700 Subject: [PATCH 15/30] Addressed another stubtest failure. --- stubs/redis/redis/asyncio/connection.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/redis/redis/asyncio/connection.pyi b/stubs/redis/redis/asyncio/connection.pyi index 4199f14577d8..e337975c0130 100644 --- a/stubs/redis/redis/asyncio/connection.pyi +++ b/stubs/redis/redis/asyncio/connection.pyi @@ -24,7 +24,7 @@ SYM_EMPTY: Final[bytes] SERVER_CLOSED_CONNECTION_ERROR: Final[str] class _Sentinel(enum.Enum): - sentinel = ... + sentinel = object() SENTINEL: Final[object] MODULE_LOAD_ERROR: Final[str] From 56560c27bf3ba73110ea435813349472fe018f97 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Wed, 10 Apr 2024 15:48:29 -0700 Subject: [PATCH 16/30] Silenced a pyright error. --- stdlib/ssl.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/ssl.pyi b/stdlib/ssl.pyi index aace8c198c73..313753307e56 100644 --- a/stdlib/ssl.pyi +++ b/stdlib/ssl.pyi @@ -316,8 +316,8 @@ class _ASN1Object(_ASN1ObjectBase): def fromname(cls, name: str) -> Self: ... class Purpose(_ASN1Object, enum.Enum): - SERVER_AUTH = "1.3.6.1.5.5.7.3.1" - CLIENT_AUTH = "1.3.6.1.5.5.7.3.2" + SERVER_AUTH = "1.3.6.1.5.5.7.3.1" # pyright: ignore[reportCallIssue] + CLIENT_AUTH = "1.3.6.1.5.5.7.3.2" # pyright: ignore[reportCallIssue] class SSLSocket(socket.socket): context: SSLContext From 0748e2356f9fcd274e89276b58c8f6a8b559c5bd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 22:50:01 +0000 Subject: [PATCH 17/30] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/ssl.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/ssl.pyi b/stdlib/ssl.pyi index 313753307e56..874a8f55444c 100644 --- a/stdlib/ssl.pyi +++ b/stdlib/ssl.pyi @@ -316,8 +316,8 @@ class _ASN1Object(_ASN1ObjectBase): def fromname(cls, name: str) -> Self: ... class Purpose(_ASN1Object, enum.Enum): - SERVER_AUTH = "1.3.6.1.5.5.7.3.1" # pyright: ignore[reportCallIssue] - CLIENT_AUTH = "1.3.6.1.5.5.7.3.2" # pyright: ignore[reportCallIssue] + SERVER_AUTH = "1.3.6.1.5.5.7.3.1" # pyright: ignore[reportCallIssue] + CLIENT_AUTH = "1.3.6.1.5.5.7.3.2" # pyright: ignore[reportCallIssue] class SSLSocket(socket.socket): context: SSLContext From 79d034dc7fc7e73fc2049c3f046ae3f12ee552f7 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Wed, 10 Apr 2024 15:57:10 -0700 Subject: [PATCH 18/30] Trying to make stubtest happy. --- stdlib/ssl.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/ssl.pyi b/stdlib/ssl.pyi index 313753307e56..6052e1d53913 100644 --- a/stdlib/ssl.pyi +++ b/stdlib/ssl.pyi @@ -316,8 +316,8 @@ class _ASN1Object(_ASN1ObjectBase): def fromname(cls, name: str) -> Self: ... class Purpose(_ASN1Object, enum.Enum): - SERVER_AUTH = "1.3.6.1.5.5.7.3.1" # pyright: ignore[reportCallIssue] - CLIENT_AUTH = "1.3.6.1.5.5.7.3.2" # pyright: ignore[reportCallIssue] + SERVER_AUTH = (129, 'serverAuth', 'TLS Web Server Authentication', "1.3.6.1.5.5.7.3.2") # pyright: ignore[reportCallIssue] + CLIENT_AUTH = (130, 'clientAuth', 'TLS Web Client Authentication', "1.3.6.1.5.5.7.3.1") # pyright: ignore[reportCallIssue] class SSLSocket(socket.socket): context: SSLContext From a66fb38c95f128c39262af785b3d2691e8950abd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 22:59:11 +0000 Subject: [PATCH 19/30] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/ssl.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/ssl.pyi b/stdlib/ssl.pyi index 6052e1d53913..81c68c69ec4e 100644 --- a/stdlib/ssl.pyi +++ b/stdlib/ssl.pyi @@ -316,8 +316,8 @@ class _ASN1Object(_ASN1ObjectBase): def fromname(cls, name: str) -> Self: ... class Purpose(_ASN1Object, enum.Enum): - SERVER_AUTH = (129, 'serverAuth', 'TLS Web Server Authentication', "1.3.6.1.5.5.7.3.2") # pyright: ignore[reportCallIssue] - CLIENT_AUTH = (130, 'clientAuth', 'TLS Web Client Authentication', "1.3.6.1.5.5.7.3.1") # pyright: ignore[reportCallIssue] + SERVER_AUTH = (129, "serverAuth", "TLS Web Server Authentication", "1.3.6.1.5.5.7.3.2") # pyright: ignore[reportCallIssue] + CLIENT_AUTH = (130, "clientAuth", "TLS Web Client Authentication", "1.3.6.1.5.5.7.3.1") # pyright: ignore[reportCallIssue] class SSLSocket(socket.socket): context: SSLContext From 4aef83bbdad2f787d8459b13f27a78a347678977 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Thu, 11 Apr 2024 11:08:39 +0100 Subject: [PATCH 20/30] fix pre-commit errors --- .flake8 | 4 ++++ stubs/psutil/psutil/_pswindows.pyi | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.flake8 b/.flake8 index 6e9aa5d979af..daefaf3ce03a 100644 --- a/.flake8 +++ b/.flake8 @@ -10,6 +10,10 @@ per-file-ignores = *.py: NQA # TODO: Remove bare "Incomplete"s from stubs (Y065) *.pyi: Y065 + # Ignore Y052 in this file: there are loads of false positives + # due to the fact that flake8-pyi doesn't understand subclasses of `CoerciveEnum` + # as being enum classes + stubs/fpdf2/fpdf/enums.pyi: Y052, Y065 # Generated protobuf files: # Y021: Include docstrings # Y023: Alias typing as typing_extensions diff --git a/stubs/psutil/psutil/_pswindows.pyi b/stubs/psutil/psutil/_pswindows.pyi index 8dde5d5d7902..283286b1a6af 100644 --- a/stubs/psutil/psutil/_pswindows.pyi +++ b/stubs/psutil/psutil/_pswindows.pyi @@ -36,12 +36,12 @@ AddressFamily: Any TCP_STATUSES: Any class Priority(enum.IntEnum): - ABOVE_NORMAL_PRIORITY_CLASS = 32768 - BELOW_NORMAL_PRIORITY_CLASS = 16384 - HIGH_PRIORITY_CLASS = 128 - IDLE_PRIORITY_CLASS = 64 - NORMAL_PRIORITY_CLASS = 32 - REALTIME_PRIORITY_CLASS = 256 + ABOVE_NORMAL_PRIORITY_CLASS = ABOVE_NORMAL_PRIORITY_CLASS + BELOW_NORMAL_PRIORITY_CLASS = BELOW_NORMAL_PRIORITY_CLASS + HIGH_PRIORITY_CLASS = HIGH_PRIORITY_CLASS + IDLE_PRIORITY_CLASS = IDLE_PRIORITY_CLASS + NORMAL_PRIORITY_CLASS = NORMAL_PRIORITY_CLASS + REALTIME_PRIORITY_CLASS = REALTIME_PRIORITY_CLASS IOPRIO_VERYLOW: int IOPRIO_LOW: int From e0f8e84b90e22643f0c1b497bc82c547cab5b4e7 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Thu, 11 Apr 2024 11:17:10 +0100 Subject: [PATCH 21/30] make sure it's Final constants being assigned in the psutil enum --- stubs/psutil/psutil/_psutil_windows.pyi | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/stubs/psutil/psutil/_psutil_windows.pyi b/stubs/psutil/psutil/_psutil_windows.pyi index d0fc2b5e4022..a65eb03ed53f 100644 --- a/stubs/psutil/psutil/_psutil_windows.pyi +++ b/stubs/psutil/psutil/_psutil_windows.pyi @@ -1,11 +1,13 @@ -ABOVE_NORMAL_PRIORITY_CLASS: int -BELOW_NORMAL_PRIORITY_CLASS: int +from typing import Final + +ABOVE_NORMAL_PRIORITY_CLASS: Final = 32768 +BELOW_NORMAL_PRIORITY_CLASS: Final = 16384 ERROR_ACCESS_DENIED: int ERROR_INVALID_NAME: int ERROR_PRIVILEGE_NOT_HELD: int ERROR_SERVICE_DOES_NOT_EXIST: int -HIGH_PRIORITY_CLASS: int -IDLE_PRIORITY_CLASS: int +HIGH_PRIORITY_CLASS: Final = 128 +IDLE_PRIORITY_CLASS: Final = 64 INFINITE: int MIB_TCP_STATE_CLOSED: int MIB_TCP_STATE_CLOSE_WAIT: int @@ -19,9 +21,9 @@ MIB_TCP_STATE_LISTEN: int MIB_TCP_STATE_SYN_RCVD: int MIB_TCP_STATE_SYN_SENT: int MIB_TCP_STATE_TIME_WAIT: int -NORMAL_PRIORITY_CLASS: int +NORMAL_PRIORITY_CLASS: Final = 32 PSUTIL_CONN_NONE: int -REALTIME_PRIORITY_CLASS: int +REALTIME_PRIORITY_CLASS: Final = 256 WINDOWS_10: int WINDOWS_7: int WINDOWS_8: int From e4ab75c9690cd2c6bb87ba12a3231922a5ed000f Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Thu, 11 Apr 2024 13:09:29 +0100 Subject: [PATCH 22/30] Update .flake8 --- .flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index 8297e2be51c8..65265bce91b9 100644 --- a/.flake8 +++ b/.flake8 @@ -11,7 +11,7 @@ per-file-ignores = # Ignore Y052 in this file: there are loads of false positives # due to the fact that flake8-pyi doesn't understand subclasses of `CoerciveEnum` # as being enum classes - stubs/fpdf2/fpdf/enums.pyi: Y052, Y065 + stubs/fpdf2/fpdf/enums.pyi: Y052 # Generated protobuf files: # Y021: Include docstrings # Y023: Alias typing as typing_extensions From bd170fab90094ce6f711af36db556299234a4c58 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Fri, 12 Apr 2024 22:24:25 -0700 Subject: [PATCH 23/30] Address issue with unknown integer values for platform-specific button types. --- stubs/pynput/pynput/mouse/_base.pyi | 58 ++++++++++++++--------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/stubs/pynput/pynput/mouse/_base.pyi b/stubs/pynput/pynput/mouse/_base.pyi index 18de43e741cf..040f8d32a933 100644 --- a/stubs/pynput/pynput/mouse/_base.pyi +++ b/stubs/pynput/pynput/mouse/_base.pyi @@ -13,36 +13,36 @@ class Button(enum.Enum): middle = 2 right = 3 if sys.platform == "linux": - button8 = ... - button9 = ... - button10 = ... - button11 = ... - button12 = ... - button13 = ... - button14 = ... - button15 = ... - button16 = ... - button17 = ... - button18 = ... - button19 = ... - button20 = ... - button21 = ... - button22 = ... - button23 = ... - button24 = ... - button25 = ... - button26 = ... - button27 = ... - button28 = ... - button29 = ... - button30 = ... - scroll_down = ... - scroll_left = ... - scroll_right = ... - scroll_up = ... + button8 = int() + button9 = int() + button10 = int() + button11 = int() + button12 = int() + button13 = int() + button14 = int() + button15 = int() + button16 = int() + button17 = int() + button18 = int() + button19 = int() + button20 = int() + button21 = int() + button22 = int() + button23 = int() + button24 = int() + button25 = int() + button26 = int() + button27 = int() + button28 = int() + button29 = int() + button30 = int() + scroll_down = int() + scroll_left = int() + scroll_right = int() + scroll_up = int() if sys.platform == "win32": - x1 = ... - x2 = ... + x1 = int() + x2 = int() class Controller: def __init__(self) -> None: ... From 71684a834d95a14396da192bfffa4fdcb7c58f8f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 05:25:59 +0000 Subject: [PATCH 24/30] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stubs/pynput/pynput/mouse/_base.pyi | 58 ++++++++++++++--------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/stubs/pynput/pynput/mouse/_base.pyi b/stubs/pynput/pynput/mouse/_base.pyi index 040f8d32a933..dd1bb452953a 100644 --- a/stubs/pynput/pynput/mouse/_base.pyi +++ b/stubs/pynput/pynput/mouse/_base.pyi @@ -13,36 +13,36 @@ class Button(enum.Enum): middle = 2 right = 3 if sys.platform == "linux": - button8 = int() - button9 = int() - button10 = int() - button11 = int() - button12 = int() - button13 = int() - button14 = int() - button15 = int() - button16 = int() - button17 = int() - button18 = int() - button19 = int() - button20 = int() - button21 = int() - button22 = int() - button23 = int() - button24 = int() - button25 = int() - button26 = int() - button27 = int() - button28 = int() - button29 = int() - button30 = int() - scroll_down = int() - scroll_left = int() - scroll_right = int() - scroll_up = int() + button8 = 0 + button9 = 0 + button10 = 0 + button11 = 0 + button12 = 0 + button13 = 0 + button14 = 0 + button15 = 0 + button16 = 0 + button17 = 0 + button18 = 0 + button19 = 0 + button20 = 0 + button21 = 0 + button22 = 0 + button23 = 0 + button24 = 0 + button25 = 0 + button26 = 0 + button27 = 0 + button28 = 0 + button29 = 0 + button30 = 0 + scroll_down = 0 + scroll_left = 0 + scroll_right = 0 + scroll_up = 0 if sys.platform == "win32": - x1 = int() - x2 = int() + x1 = 0 + x2 = 0 class Controller: def __init__(self) -> None: ... From 762439d6738c7ba81d5025950c2311d81c039f74 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sun, 14 Apr 2024 10:40:05 -0700 Subject: [PATCH 25/30] Added literal values for linux-specific button enums. --- stubs/pynput/pynput/mouse/_base.pyi | 60 ++++++++++++++--------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/stubs/pynput/pynput/mouse/_base.pyi b/stubs/pynput/pynput/mouse/_base.pyi index 040f8d32a933..e5ee00efb222 100644 --- a/stubs/pynput/pynput/mouse/_base.pyi +++ b/stubs/pynput/pynput/mouse/_base.pyi @@ -8,41 +8,41 @@ from typing_extensions import Self from pynput._util import AbstractListener class Button(enum.Enum): - unknown = 0 + unknown = None left = 1 middle = 2 right = 3 if sys.platform == "linux": - button8 = int() - button9 = int() - button10 = int() - button11 = int() - button12 = int() - button13 = int() - button14 = int() - button15 = int() - button16 = int() - button17 = int() - button18 = int() - button19 = int() - button20 = int() - button21 = int() - button22 = int() - button23 = int() - button24 = int() - button25 = int() - button26 = int() - button27 = int() - button28 = int() - button29 = int() - button30 = int() - scroll_down = int() - scroll_left = int() - scroll_right = int() - scroll_up = int() + button8 = 8 + button9 = 9 + button10 = 10 + button11 = 11 + button12 = 12 + button13 = 13 + button14 = 14 + button15 = 15 + button16 = 16 + button17 = 17 + button18 = 18 + button19 = 19 + button20 = 20 + button21 = 21 + button22 = 22 + button23 = 23 + button24 = 24 + button25 = 25 + button26 = 26 + button27 = 27 + button28 = 28 + button29 = 29 + button30 = 30 + scroll_down = 5 + scroll_left = 6 + scroll_right = 7 + scroll_up = 4 if sys.platform == "win32": - x1 = int() - x2 = int() + x1 = int() # Value unknown + x2 = int() # Value unknown class Controller: def __init__(self) -> None: ... From 18c01114a224fe37a6c56526cea7667862d19ce8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 14 Apr 2024 17:44:35 +0000 Subject: [PATCH 26/30] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stubs/pynput/pynput/mouse/_base.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stubs/pynput/pynput/mouse/_base.pyi b/stubs/pynput/pynput/mouse/_base.pyi index 0b703a13f6aa..7a66dc78936d 100644 --- a/stubs/pynput/pynput/mouse/_base.pyi +++ b/stubs/pynput/pynput/mouse/_base.pyi @@ -41,8 +41,8 @@ class Button(enum.Enum): scroll_right = 7 scroll_up = 4 if sys.platform == "win32": - x1 = 0 # Value unknown - x2 = 0 # Value unknown + x1 = 0 # Value unknown + x2 = 0 # Value unknown class Controller: def __init__(self) -> None: ... From fb0a2c43cc64d07d82e245087ca592ad6ac452da Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 14 Apr 2024 17:05:07 -0700 Subject: [PATCH 27/30] unknown is 0 according to stubtest --- stubs/pynput/pynput/mouse/_base.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/pynput/pynput/mouse/_base.pyi b/stubs/pynput/pynput/mouse/_base.pyi index 7a66dc78936d..4874e3be814f 100644 --- a/stubs/pynput/pynput/mouse/_base.pyi +++ b/stubs/pynput/pynput/mouse/_base.pyi @@ -8,7 +8,7 @@ from typing_extensions import Self from pynput._util import AbstractListener class Button(enum.Enum): - unknown = None + unknown = 0 left = 1 middle = 2 right = 3 From 129de9e86c00d65c56a9b555698d8d47722b1d06 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 14 Apr 2024 17:12:39 -0700 Subject: [PATCH 28/30] deal with Key enum --- stubs/pynput/pynput/keyboard/_base.pyi | 129 +++++++++++++------------ 1 file changed, 65 insertions(+), 64 deletions(-) diff --git a/stubs/pynput/pynput/keyboard/_base.pyi b/stubs/pynput/pynput/keyboard/_base.pyi index 46db628c43de..788df213ce77 100644 --- a/stubs/pynput/pynput/keyboard/_base.pyi +++ b/stubs/pynput/pynput/keyboard/_base.pyi @@ -25,71 +25,72 @@ class KeyCode: def from_dead(cls, char: str, **kwargs: Any) -> Self: ... class Key(enum.Enum): - alt = 0 - alt_l = 0 - alt_r = 0 - alt_gr = 0 - backspace = 0 - caps_lock = 0 - cmd = 0 - cmd_l = 0 - cmd_r = 0 - ctrl = 0 - ctrl_l = 0 - ctrl_r = 0 - delete = 0 - down = 0 - end = 0 - enter = 0 - esc = 0 - f1 = 0 - f2 = 0 - f3 = 0 - f4 = 0 - f5 = 0 - f6 = 0 - f7 = 0 - f8 = 0 - f9 = 0 - f10 = 0 - f11 = 0 - f12 = 0 - f13 = 0 - f14 = 0 - f15 = 0 - f16 = 0 - f17 = 0 - f18 = 0 - f19 = 0 - f20 = 0 + _value_: KeyCode + alt = ... + alt_l = ... + alt_r = ... + alt_gr = ... + backspace = ... + caps_lock = ... + cmd = ... + cmd_l = ... + cmd_r = ... + ctrl = ... + ctrl_l = ... + ctrl_r = ... + delete = ... + down = ... + end = ... + enter = ... + esc = ... + f1 = ... + f2 = ... + f3 = ... + f4 = ... + f5 = ... + f6 = ... + f7 = ... + f8 = ... + f9 = ... + f10 = ... + f11 = ... + f12 = ... + f13 = ... + f14 = ... + f15 = ... + f16 = ... + f17 = ... + f18 = ... + f19 = ... + f20 = ... if sys.platform == "win32": - f21 = 0 - f22 = 0 - f23 = 0 - f24 = 0 - home = 0 - left = 0 - page_down = 0 - page_up = 0 - right = 0 - shift = 0 - shift_l = 0 - shift_r = 0 - space = 0 - tab = 0 - up = 0 - media_play_pause = 0 - media_volume_mute = 0 - media_volume_down = 0 - media_volume_up = 0 - media_previous = 0 - media_next = 0 - insert = 0 - menu = 0 - num_lock = 0 - pause = 0 - print_screen = 0 - scroll_lock = 0 + f21 = ... + f22 = ... + f23 = ... + f24 = ... + home = ... + left = ... + page_down = ... + page_up = ... + right = ... + shift = ... + shift_l = ... + shift_r = ... + space = ... + tab = ... + up = ... + media_play_pause = ... + media_volume_mute = ... + media_volume_down = ... + media_volume_up = ... + media_previous = ... + media_next = ... + insert = ... + menu = ... + num_lock = ... + pause = ... + print_screen = ... + scroll_lock = ... class Controller: _KeyCode: ClassVar[type[KeyCode]] # undocumented From 843d4ad80160f6f2d0ccf0d96955a3feefd4443d Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 14 Apr 2024 17:21:52 -0700 Subject: [PATCH 29/30] Everything is an alias for alt --- stubs/pynput/pynput/keyboard/_base.pyi | 129 ++++++++++++------------- 1 file changed, 64 insertions(+), 65 deletions(-) diff --git a/stubs/pynput/pynput/keyboard/_base.pyi b/stubs/pynput/pynput/keyboard/_base.pyi index 788df213ce77..5050c52ee832 100644 --- a/stubs/pynput/pynput/keyboard/_base.pyi +++ b/stubs/pynput/pynput/keyboard/_base.pyi @@ -25,72 +25,71 @@ class KeyCode: def from_dead(cls, char: str, **kwargs: Any) -> Self: ... class Key(enum.Enum): - _value_: KeyCode - alt = ... - alt_l = ... - alt_r = ... - alt_gr = ... - backspace = ... - caps_lock = ... - cmd = ... - cmd_l = ... - cmd_r = ... - ctrl = ... - ctrl_l = ... - ctrl_r = ... - delete = ... - down = ... - end = ... - enter = ... - esc = ... - f1 = ... - f2 = ... - f3 = ... - f4 = ... - f5 = ... - f6 = ... - f7 = ... - f8 = ... - f9 = ... - f10 = ... - f11 = ... - f12 = ... - f13 = ... - f14 = ... - f15 = ... - f16 = ... - f17 = ... - f18 = ... - f19 = ... - f20 = ... + alt = 0 + alt_l = alt + alt_r = alt + alt_gr = alt + backspace = alt + caps_lock = alt + cmd = alt + cmd_l = alt + cmd_r = alt + ctrl = alt + ctrl_l = alt + ctrl_r = alt + delete = alt + down = alt + end = alt + enter = alt + esc = alt + f1 = alt + f2 = alt + f3 = alt + f4 = alt + f5 = alt + f6 = alt + f7 = alt + f8 = alt + f9 = alt + f10 = alt + f11 = alt + f12 = alt + f13 = alt + f14 = alt + f15 = alt + f16 = alt + f17 = alt + f18 = alt + f19 = alt + f20 = alt if sys.platform == "win32": - f21 = ... - f22 = ... - f23 = ... - f24 = ... - home = ... - left = ... - page_down = ... - page_up = ... - right = ... - shift = ... - shift_l = ... - shift_r = ... - space = ... - tab = ... - up = ... - media_play_pause = ... - media_volume_mute = ... - media_volume_down = ... - media_volume_up = ... - media_previous = ... - media_next = ... - insert = ... - menu = ... - num_lock = ... - pause = ... - print_screen = ... - scroll_lock = ... + f21 = alt + f22 = alt + f23 = alt + f24 = alt + home = alt + left = alt + page_down = alt + page_up = alt + right = alt + shift = alt + shift_l = alt + shift_r = alt + space = alt + tab = alt + up = alt + media_play_pause = alt + media_volume_mute = alt + media_volume_down = alt + media_volume_up = alt + media_previous = alt + media_next = alt + insert = alt + menu = alt + num_lock = alt + pause = alt + print_screen = alt + scroll_lock = alt class Controller: _KeyCode: ClassVar[type[KeyCode]] # undocumented From 279a068966aa21b76fd3c06a5dce32d1ab58d0cb Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 22 Apr 2024 15:00:02 +0100 Subject: [PATCH 30/30] Make the requested changes --- stubs/fpdf2/fpdf/enums.pyi | 102 +++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 50 deletions(-) diff --git a/stubs/fpdf2/fpdf/enums.pyi b/stubs/fpdf2/fpdf/enums.pyi index 897fbd9697da..dc2479558522 100644 --- a/stubs/fpdf2/fpdf/enums.pyi +++ b/stubs/fpdf2/fpdf/enums.pyi @@ -2,6 +2,8 @@ from enum import Enum, Flag, IntEnum, IntFlag from typing import Literal from typing_extensions import Self +from .syntax import Name + class SignatureFlag(IntEnum): SIGNATURES_EXIST = 1 APPEND_ONLY = 2 @@ -124,44 +126,44 @@ class Angle(CoerciveIntEnum): NORTHWEST = 135 class PageLayout(CoerciveEnum): - SINGLE_PAGE = "SinglePage" - ONE_COLUMN = "OneColumn" - TWO_COLUMN_LEFT = "TwoColumnLeft" - TWO_COLUMN_RIGHT = "TwoColumnRight" - TWO_PAGE_LEFT = "TwoPageLeft" - TWO_PAGE_RIGHT = "TwoPageRight" + SINGLE_PAGE = Name("SinglePage") + ONE_COLUMN = Name("OneColumn") + TWO_COLUMN_LEFT = Name("TwoColumnLeft") + TWO_COLUMN_RIGHT = Name("TwoColumnRight") + TWO_PAGE_LEFT = Name("TwoPageLeft") + TWO_PAGE_RIGHT = Name("TwoPageRight") class PageMode(CoerciveEnum): - USE_NONE = "UseNone" - USE_OUTLINES = "UseOutlines" - USE_THUMBS = "UseThumbs" - FULL_SCREEN = "FullScreen" - USE_OC = "UseOC" - USE_ATTACHMENTS = "UseAttachments" + USE_NONE = Name("UseNone") + USE_OUTLINES = Name("UseOutlines") + USE_THUMBS = Name("UseThumbs") + FULL_SCREEN = Name("FullScreen") + USE_OC = Name("UseOC") + USE_ATTACHMENTS = Name("UseAttachments") class TextMarkupType(CoerciveEnum): - HIGHLIGHT = "Highlight" - UNDERLINE = "Underline" - SQUIGGLY = "Squiggly" - STRIKE_OUT = "StrikeOut" + HIGHLIGHT = Name("Highlight") + UNDERLINE = Name("Underline") + SQUIGGLY = Name("Squiggly") + STRIKE_OUT = Name("StrikeOut") class BlendMode(CoerciveEnum): - NORMAL = "Normal" - MULTIPLY = "Multiply" - SCREEN = "Screen" - OVERLAY = "Overlay" - DARKEN = "Darken" - LIGHTEN = "Lighten" - COLOR_DODGE = "ColorDodge" - COLOR_BURN = "ColorBurn" - HARD_LIGHT = "HardLight" - SOFT_LIGHT = "SoftLight" - DIFFERENCE = "Difference" - EXCLUSION = "Exclusion" - HUE = "Hue" - SATURATION = "Saturation" - COLOR = "Color" - LUMINOSITY = "Luminosity" + NORMAL = Name("Normal") + MULTIPLY = Name("Multiply") + SCREEN = Name("Screen") + OVERLAY = Name("Overlay") + DARKEN = Name("Darken") + LIGHTEN = Name("Lighten") + COLOR_DODGE = Name("ColorDodge") + COLOR_BURN = Name("ColorBurn") + HARD_LIGHT = Name("HardLight") + SOFT_LIGHT = Name("SoftLight") + DIFFERENCE = Name("Difference") + EXCLUSION = Name("Exclusion") + HUE = Name("Hue") + SATURATION = Name("Saturation") + COLOR = Name("Color") + LUMINOSITY = Name("Luminosity") class AnnotationFlag(CoerciveIntEnum): INVISIBLE = 1 @@ -176,17 +178,17 @@ class AnnotationFlag(CoerciveIntEnum): LOCKED_CONTENTS = 512 class AnnotationName(CoerciveEnum): - NOTE = "Note" - COMMENT = "Comment" - HELP = "Help" - PARAGRAPH = "Paragraph" - NEW_PARAGRAPH = "NewParagraph" - INSERT = "Insert" + NOTE = Name("Note") + COMMENT = Name("Comment") + HELP = Name("Help") + PARAGRAPH = Name("Paragraph") + NEW_PARAGRAPH = Name("NewParagraph") + INSERT = Name("Insert") class FileAttachmentAnnotationName(CoerciveEnum): - PUSH_PIN = "PushPin" - GRAPH_PUSH_PIN = "GraphPushPin" - PAPERCLIP_TAG = "PaperclipTag" + PUSH_PIN = Name("PushPin") + GRAPH_PUSH_PIN = Name("GraphPushPin") + PAPERCLIP_TAG = Name("PaperclipTag") class IntersectionRule(CoerciveEnum): NONZERO = "nonzero" @@ -216,15 +218,15 @@ class StrokeJoinStyle(CoerciveIntEnum): BEVEL = 2 class PDFStyleKeys(Enum): - FILL_ALPHA = "ca" - BLEND_MODE = "BM" - STROKE_ALPHA = "CA" - STROKE_ADJUSTMENT = "SA" - STROKE_WIDTH = "LW" - STROKE_CAP_STYLE = "LC" - STROKE_JOIN_STYLE = "LJ" - STROKE_MITER_LIMIT = "ML" - STROKE_DASH_PATTERN = "D" + FILL_ALPHA = Name("ca") + BLEND_MODE = Name("BM") + STROKE_ALPHA = Name("CA") + STROKE_ADJUSTMENT = Name("SA") + STROKE_WIDTH = Name("LW") + STROKE_CAP_STYLE = Name("LC") + STROKE_JOIN_STYLE = Name("LJ") + STROKE_MITER_LIMIT = Name("ML") + STROKE_DASH_PATTERN = Name("D") class Corner(CoerciveEnum): TOP_RIGHT = "TOP_RIGHT"