From 9008db48e59735ed63cf3fc06c47687e0c4345dc Mon Sep 17 00:00:00 2001 From: Ashley Whetter Date: Sun, 5 Apr 2020 18:25:07 -0700 Subject: [PATCH] Added assertion to assist with import resolution debugging --- autoapi/mappers/python/mapper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoapi/mappers/python/mapper.py b/autoapi/mappers/python/mapper.py index c6b21ff..0767dfa 100644 --- a/autoapi/mappers/python/mapper.py +++ b/autoapi/mappers/python/mapper.py @@ -163,6 +163,9 @@ def _resolve_placeholder(placeholder, original): :type original: dict """ new = copy.deepcopy(original) + # We are supposed to be resolving the placeholder, + # not replacing it with another. + assert original["type"] != "placeholder" # The name remains the same. new["name"] = placeholder["name"] new["full_name"] = placeholder["full_name"]