mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Merge pull request #2760 from jamestwebber/dedup-whats-left
Use inspect.getmodule to prevent redundant output in whats_left.sh
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user