Skip to content

Commit 4a14d06

Browse files
authored
CLN: Replace sphinx's rpartition with python's in-built one (#43360)
1 parent 0fdb559 commit 4a14d06

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

doc/source/conf.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,6 @@
461461
# eg pandas.Series.str and pandas.Series.dt (see GH9322)
462462

463463
import sphinx # isort:skip
464-
from sphinx.util import rpartition # isort:skip
465464
from sphinx.ext.autodoc import ( # isort:skip
466465
AttributeDocumenter,
467466
Documenter,
@@ -521,8 +520,8 @@ def resolve_name(self, modname, parents, path, base):
521520
# HACK: this is added in comparison to ClassLevelDocumenter
522521
# mod_cls still exists of class.accessor, so an extra
523522
# rpartition is needed
524-
modname, accessor = rpartition(mod_cls, ".")
525-
modname, cls = rpartition(modname, ".")
523+
modname, _, accessor = mod_cls.rpartition(".")
524+
modname, _, cls = modname.rpartition(".")
526525
parents = [cls, accessor]
527526
# if the module name is still missing, get it like above
528527
if not modname:

0 commit comments

Comments
 (0)