From b82c29fdee04e2c8326c121dc32366ce0ece3f2f Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Sun, 22 Jan 2023 00:54:52 -0800 Subject: [PATCH] stubgen: treat dlls as c modules Fixes #14028 --- mypy/moduleinspect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/moduleinspect.py b/mypy/moduleinspect.py index feca1f43abf2..b383fc9dc145 100644 --- a/mypy/moduleinspect.py +++ b/mypy/moduleinspect.py @@ -36,7 +36,7 @@ def is_c_module(module: ModuleType) -> bool: # Could be a namespace package. These must be handled through # introspection, since there is no source file. return True - return os.path.splitext(module.__dict__["__file__"])[-1] in [".so", ".pyd"] + return os.path.splitext(module.__dict__["__file__"])[-1] in [".so", ".pyd", ".dll"] class InspectError(Exception):