From 741fedb0fed7a076cc7742737bd4fc59348f4bbc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 11 May 2020 10:17:48 +0200 Subject: [PATCH] documentation/python: a futile attempt to improve a firing assert. Continuation of f45a8b060c5cd875da1fe66982025627c2747359. --- documentation/python.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/python.py b/documentation/python.py index 08ebcc83..acc614d6 100755 --- a/documentation/python.py +++ b/documentation/python.py @@ -383,8 +383,8 @@ def crawl_class(state: State, path: List[str], class_): # one would hope so we can't just assert. if id(class_) in state.crawled: for name, previous_entry in state.name_map.items(): - if previous_entry.object == class_: break - else: assert False + if id(previous_entry.object) == id(class_): break + else: assert False, "%s marked as crawled but can't find it" % '.'.join(path) logging.error("Class %s previously found in %s, only one occurence will be chosen. Ensure each class is exposed only in a single module for generating correct documentation.", '.'.join(path), '.'.join(previous_entry.path)) state.name_map['.'.join(path)] = previous_entry return -- 2.30.2