chiark / gitweb /
documentation/python: implement name mapping for _all__.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 7 May 2019 22:03:47 +0000 (00:03 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Tue, 21 May 2019 14:51:51 +0000 (16:51 +0200)
commit853168039f007e1cbfcbf419eb15b29b2f15d4bc
tree2cba2f9d05b30a3b35ecd109e25ac2962ac555f6
parent3d3a1b1ac388d1b3cd22adf54c0a3ecc992e3af0
documentation/python: implement name mapping for _all__.

Basically, if there's this in the code:

    from ._native import Foo as PublicName
    from ._native import sub as submodule

    __all__ = ['PublicName', 'submodule']

then it's clear that the docs should refere library.PublicName and
library.submodule instead of library._native.Foo / library._native.sub.
This mapping is done for both pybind11 signatures and pure Python code.
16 files changed:
documentation/.gitignore
documentation/python.py
documentation/test_python/CMakeLists.txt
documentation/test_python/inspect_name_mapping/inspect_name_mapping.Class.html [new file with mode: 0644]
documentation/test_python/inspect_name_mapping/inspect_name_mapping.html [new file with mode: 0644]
documentation/test_python/inspect_name_mapping/inspect_name_mapping.submodule.html [new file with mode: 0644]
documentation/test_python/inspect_name_mapping/inspect_name_mapping/__init__.py [new file with mode: 0644]
documentation/test_python/inspect_name_mapping/inspect_name_mapping/_sub/__init__.py [new file with mode: 0644]
documentation/test_python/inspect_name_mapping/inspect_name_mapping/_sub/bar.py [new file with mode: 0644]
documentation/test_python/pybind_name_mapping/pybind_name_mapping.Class.html [new file with mode: 0644]
documentation/test_python/pybind_name_mapping/pybind_name_mapping.html [new file with mode: 0644]
documentation/test_python/pybind_name_mapping/pybind_name_mapping.submodule.html [new file with mode: 0644]
documentation/test_python/pybind_name_mapping/pybind_name_mapping/__init__.py [new file with mode: 0644]
documentation/test_python/pybind_name_mapping/sub.cpp [new file with mode: 0644]
documentation/test_python/test_inspect.py
documentation/test_python/test_pybind.py