Skip to content

DOC: add py:type reference targets to each entry in pandas.api.typing.aliases #63810

@flying-sheep

Description

@flying-sheep

Pandas version checks

  • I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

https://pandas.pydata.org/docs/dev/reference/aliases.html

Documentation problem

Trying to link to the type aliases with Sphinx 9’s :type: role doesn’t work.

That’s because you don’t have them in your intersphinx inventory at all. In #61735, you added (failing) references to them instead of using directives to define reference targets for them:

==================================== ================================================================
Alias Meaning
==================================== ================================================================
:py:type:`AggFuncType` Type of functions that can be passed to :meth:`agg` methods
:py:type:`AlignJoin` Argument type for ``join`` in :meth:`DataFrame.join`
:py:type:`AnyAll` Argument type for ``how`` in :meth:`dropna`
:py:type:`AnyArrayLike` Used to represent :class:`ExtensionArray`, ``numpy`` arrays, :class:`Index` and :class:`Series`

Suggested fix for documentation

This should instead be something like:

.. py:type:: AggFuncType

or, to insert docstrings automatically:

.. autotype:: AggFuncType

also that page uses .. currentmodule:: instead of .. module:: for similar effect.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions