From c7f9ee5a77f0909b2c790489de3684dc2b48852c Mon Sep 17 00:00:00 2001 From: Alibi Shalgymbay Date: Thu, 2 Sep 2021 20:07:18 +0600 Subject: [PATCH] CLN: Replace sphinx's rpartition with python's in-built one --- doc/source/conf.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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: