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
Is your feature request related to a problem? Please describe.
When importing an object with only dots in its path, it is hard to know what is a module and what is an object. It leads to confusing tracebacks: #53, mkdocstrings/mkdocstrings#127
Describe the solution you'd like
To ease the process of importing the object, and to be able to return better error messages, we could support having a colon in the object's path. This colon would delimit the last submodule from the first object. We wouldn't need to try and import the whole path, going up one level each time, to find the deepest submodule. An import error happening in the deepest submodule would be reraised as is, clearly showing what the problem is to the user in mkdocstrings logs.
Describe alternatives you've considered
Additional checks as proposed in this comment.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When importing an object with only dots in its path, it is hard to know what is a module and what is an object. It leads to confusing tracebacks: #53, mkdocstrings/mkdocstrings#127
Describe the solution you'd like
To ease the process of importing the object, and to be able to return better error messages, we could support having a colon in the object's path. This colon would delimit the last submodule from the first object. We wouldn't need to try and import the whole path, going up one level each time, to find the deepest submodule. An import error happening in the deepest submodule would be reraised as is, clearly showing what the problem is to the user in mkdocstrings logs.
Describe alternatives you've considered
Additional checks as proposed in this comment.
The text was updated successfully, but these errors were encountered: