Add doc string to DocumentationBuilder.
Explain that resources from PYTHONPATH are not supported by this
factory method. That functionality was somewhat accidentally removed
as part of and worked around in
@@ -70,6 +70,14 @@ def _get_extension(source):
def DocumentationBuilder(library_or_resource):
+ """Create a documentation builder for the specified library or resource.
+
+ The argument can be a path to a library, a resource file or to a spec file
+ generated by Libdoc earlier. If the argument does not point to an existing file,
+ it is expected to be the name of the library to be imported. If a resource file
+ is to be imported from PYTHONPATH, then :class:`~.robotbuilder.ResourceDocBuilder`
+ must be used explicitly instead.
+ """
if os.path.exists(library_or_resource):
extension = _get_extension(library_or_resource)
if extension in RESOURCE_EXTENSIONS:
