From 55f65bd0ca19f85d50b320b8952a6642ae523e47 Mon Sep 17 00:00:00 2001 From: Nick Pope Date: Mon, 12 May 2025 13:21:12 +0100 Subject: [PATCH] Make stubtest ignore `__slotnames__` This is a cached list of names of slots added by the `copyreg` module. See https://github.com/typeddjango/django-stubs/pull/2584 for a case of these cropping up in `django-stubs`. --- mypy/stubtest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mypy/stubtest.py b/mypy/stubtest.py index 39b27a1f1ed3..f9e6f7d337be 100644 --- a/mypy/stubtest.py +++ b/mypy/stubtest.py @@ -1541,6 +1541,7 @@ def verify_typealias( "__getinitargs__", "__reduce_ex__", "__reduce__", + "__slotnames__", # Cached names of slots added by `copyreg` module. # ctypes weirdness "__ctype_be__", "__ctype_le__",