chiark / gitweb /
documentation/python: adopt PEP585 naming for pybind11 typing hints.
authorVladimír Vondruš <mosra@centrum.cz>
Mon, 16 Sep 2024 16:33:20 +0000 (18:33 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 16 Sep 2024 16:40:55 +0000 (18:40 +0200)
commita6311f4db9dd105a565673454453515524f631de
treedfd80b3e55b7d316dd3cdff605888000d8e03050
parentf706d7a016134317f74c69031ec8ee14bcfbedf4
documentation/python: adopt PEP585 naming for pybind11 typing hints.

This is what pybind11 2.12+ does, but as I have to parse the docstrings
and prepend the `typing.` namespace, I can retrospectively make this
change for older pybind11 versions as well. In particular, the following
is changed in type annotations of generated documentation, independently
of pybind11 version:

 - typing.Tuple is now tuple
 - typing.List is now list
 - typing.Dict is now dict
 - typing.Set is now set

If the python standard library inventory file is used, the type
annotations in signatures will now link to the builtin types instead of
the typing module.

Note that if your documentation uses external docstrings and matches
overloads by the signature, you may need to adapt the rename to make
them match again.
documentation/python.py
documentation/test_python/pybind_external_overload_docs/docs.rst
documentation/test_python/pybind_external_overload_docs/pybind_external_overload_docs.html
documentation/test_python/pybind_signatures/pybind_signatures.MyClass.html
documentation/test_python/pybind_signatures/pybind_signatures.html
documentation/test_python/pybind_type_links/pybind_type_links.cpp
documentation/test_python/pybind_type_links/pybind_type_links.html
documentation/test_python/test_pybind.py
documentation/test_python/test_search.py
package/ci/circleci.yml