From 7ad07bcbf5d7552ecd58a631a7def2c8da99d7ed Mon Sep 17 00:00:00 2001 From: James Webber Date: Thu, 29 Jul 2021 10:52:35 -0400 Subject: [PATCH] use getmodule to prevent redundant output --- extra_tests/not_impl_gen.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extra_tests/not_impl_gen.py b/extra_tests/not_impl_gen.py index 77ecd92ba..2cb868004 100644 --- a/extra_tests/not_impl_gen.py +++ b/extra_tests/not_impl_gen.py @@ -187,7 +187,10 @@ def dir_of_mod_or_error(module_name): result = {} for item_name in item_names: item = getattr(module, item_name) - result[item_name] = extra_info(item) + item_mod = inspect.getmodule(item) + # don't repeat items imported from other modules + if item_mod is module or item_mod is None: + result[item_name] = extra_info(item) return result