diff --git a/doc/source/conf.py b/doc/source/conf.py index 8df048ce65582..0096b3337e19a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -461,7 +461,6 @@ # eg pandas.Series.str and pandas.Series.dt (see GH9322) import sphinx # isort:skip -from sphinx.util import rpartition # isort:skip from sphinx.ext.autodoc import ( # isort:skip AttributeDocumenter, Documenter, @@ -521,8 +520,8 @@ def resolve_name(self, modname, parents, path, base): # HACK: this is added in comparison to ClassLevelDocumenter # mod_cls still exists of class.accessor, so an extra # rpartition is needed - modname, accessor = rpartition(mod_cls, ".") - modname, cls = rpartition(modname, ".") + modname, _, accessor = mod_cls.rpartition(".") + modname, _, cls = modname.rpartition(".") parents = [cls, accessor] # if the module name is still missing, get it like above if not modname: