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
Currently, all undeclared dependencies are reported using their import name. More specifically: declared dependencies are mapped via Pyhon packages into a set of provided import names, and any actual 3rd-party imports that fall outside this set are reported as undeclared dependencies.
We currently don't "reverse-map" these import names into the Python package names that could/would provide these import names.
Nor can we do so - in the general case:
The package that provides a given import name might not be available in the local Python environment.
There might not even exist a package that provides the import name; e.g. the import name might be misspelled.
There might be multiple Python packages that provides this import name, and we have no way of choosing between them.
However, in the common case, there would usually be a single candidate package available in the local Python environment that provides the undeclared import name, and in this case we should report this package name to the user, to indicate the package name that they probably want to add to their declared dependencies.
In the case where multiple local packages are found to provide the same import name, we should report all of them as candidates, as we have no way of selecting the most appropriate choice.
Potential example output:
Undeclared imports:
skimage # No candidate package found
or
Undeclared imports:
skimage
# hint: this import is provided by package scikit_image
# hint: this import is provided by package other_skimage_stuff
The text was updated successfully, but these errors were encountered:
(This comes from a discussion with @layus on Slack)
Currently, all undeclared dependencies are reported using their
import
name. More specifically: declared dependencies are mapped via Pyhon packages into a set of provided import names, and any actual 3rd-party imports that fall outside this set are reported as undeclared dependencies.We currently don't "reverse-map" these import names into the Python package names that could/would provide these import names.
Nor can we do so - in the general case:
import
name might be misspelled.However, in the common case, there would usually be a single candidate package available in the local Python environment that provides the undeclared import name, and in this case we should report this package name to the user, to indicate the package name that they probably want to add to their declared dependencies.
In the case where multiple local packages are found to provide the same import name, we should report all of them as candidates, as we have no way of selecting the most appropriate choice.
Potential example output:
or
The text was updated successfully, but these errors were encountered: