From ca6d84cbcb1c07b77bfa15cc1efb9643ac756132 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 26 Jan 2021 14:15:55 -0500 Subject: [PATCH] Work around https://github.com/python/mypy/issues/1153; see also https://github.com/pypa/twine/pull/551. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes #221, “Mypy error: Module 'importlib' has no attribute 'metadata'”. --- src/build/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build/__init__.py b/src/build/__init__.py index 69c8f530..26adc2d8 100644 --- a/src/build/__init__.py +++ b/src/build/__init__.py @@ -64,7 +64,7 @@ def check_dependency(req_string, ancestral_req_strings=(), parent_extras=frozens if sys.version_info >= (3, 8): from importlib import metadata as importlib_metadata else: - import importlib_metadata + import importlib_metadata # type: ignore req = packaging.requirements.Requirement(req_string)