mirror of
https://github.com/readthedocs/sphinx-autoapi
synced 2024-11-17 21:25:35 +00:00
Fixed error when an invalid object is given to an autodoc directive
This commit is contained in:
parent
7230330686
commit
3db1fd1226
@ -42,7 +42,7 @@ class AutoapiDocumenter(autodoc.Documenter):
|
|||||||
for num_splits in range(max_splits, -1, -1):
|
for num_splits in range(max_splits, -1, -1):
|
||||||
path_stack = list(reversed(self.fullname.rsplit(".", num_splits)))
|
path_stack = list(reversed(self.fullname.rsplit(".", num_splits)))
|
||||||
objects = self.env.autoapi_mapper.objects
|
objects = self.env.autoapi_mapper.objects
|
||||||
parent = objects[path_stack.pop()]
|
parent = objects.get(path_stack.pop())
|
||||||
while parent and path_stack:
|
while parent and path_stack:
|
||||||
parent = self.get_attr(parent, path_stack.pop(), None)
|
parent = self.get_attr(parent, path_stack.pop(), None)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user