You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The key is probably to allow any of the methods that return sets of modules to also allow client code to see the import paths for these modules. With the import paths, client code can then go on to use get_import_details for each direct import.
One way to do this would be to have an optional argument return_import_paths, like so:
This would be the same for find_downstream_modules, find_modules_that_directly_import and find_modules_directly_imported_by. The latter two would be not that useful unless as_packages=True is also passed (otherwise there's no way of knowing which descendants are involved in the direct import).
Activity
seddonym commentedon Dec 5, 2018
The key is probably to allow any of the methods that return sets of modules to also allow client code to see the import paths for these modules. With the import paths, client code can then go on to use
get_import_detailsfor each direct import.One way to do this would be to have an optional argument
return_import_paths, like so:This would be the same for
find_downstream_modules,find_modules_that_directly_importandfind_modules_directly_imported_by. The latter two would be not that useful unlessas_packages=Trueis also passed (otherwise there's no way of knowing which descendants are involved in the direct import).[-]Consider how direct import API methods might work with packages[/-][+]return_import_paths parameter[/+]