Changeset 13469


Ignore:
Timestamp:
17 Nov 2015, 11:53:34 (9 years ago)
Author:
uli
Message:

Add autodoc member filter.

The added filter skips members with dots in their name.

This is a temporary solution (and a workaround) that allows to get rid
of the dependency on the self-baked Sphinx version we maintain.

We will turn this filter into an option of waeup.sphinx.autodoc (a
more elegant workaround).

Hopefully, as a third step, we will get our self-baked Sphinx changes
into the base Sphinx package. That would be a solution and not a
workaround any more.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/docs/source/conf.py

    r12863 r13469  
    213213# Example configuration for intersphinx: refer to the Python standard library.
    214214intersphinx_mapping = {'http://docs.python.org/': None}
     215
     216
     217def autodoc_skip_dotnamed_members(app, what, name, obj, skip, optios):
     218    """In autodoc skip members with dot in name.
     219
     220    Sphinx chokes when it comes to objects that have dots in their name.
     221
     222    We will make this skipping an option of the then used
     223    `waeup.sphinx.autodoc` package.
     224
     225    This is clearly a workaround and not a solution. This is a
     226    workaround, not a solution.
     227
     228    In the long run our patch to Sphinx core will hopefully make it into
     229    the Sphinx package itself. This would be a solution, not a
     230    workaround.
     231    """
     232    if "." in name:
     233        ##  Uncomment the following line to see what is skipped.
     234        # print("SKIPPING %r %r %r" % (what, name, obj))
     235        return True
     236    return False
     237
     238def setup(app):
     239    app.connect('autodoc-skip-member', autodoc_skip_dotnamed_members)
Note: See TracChangeset for help on using the changeset viewer.