ssl.Purpose.__new__ comes from Enum (#13237)

This commit is contained in:
Stephen Morton
2024-12-24 09:48:08 -08:00
committed by GitHub
parent 3944c7839e
commit aaa8a7c47e
2 changed files with 4 additions and 1 deletions

View File

@@ -22,7 +22,6 @@ select.poll # Depends on configuration
socketserver.BaseServer.fileno # implemented in derived classes
socketserver.BaseServer.get_request # implemented in derived classes
socketserver.BaseServer.server_bind # implemented in derived classes
ssl.Purpose.__new__ # the multiple inheritance confuses mypy
tkinter.simpledialog.[A-Z_]+
tkinter.simpledialog.TclVersion
tkinter.simpledialog.TkVersion

View File

@@ -325,6 +325,10 @@ class _ASN1Object(_ASN1ObjectBase):
def fromname(cls, name: str) -> Self: ...
class Purpose(_ASN1Object, enum.Enum):
# Normally this class would inherit __new__ from _ASN1Object, but
# because this is an enum, the inherited __new__ is replaced at runtime with
# Enum.__new__.
def __new__(cls, value: object) -> Self: ...
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]