Skip to content
Snippets Groups Projects
Commit eeebfd2f authored by Jérémy Bobbio (Lunar)'s avatar Jérémy Bobbio (Lunar)
Browse files

Fix documentation build issues because of Sphinx limitations

The recent refactoring done in abe741a9, then used in swh-loader-svn@72dfc41,
introduced build issues with the documentation:

    …/swh/loader/svn/directory.py:docstring of swh.loader.svn.directory.SvnDirectoryLoader.snapshot:1:
        WARNING: more than one target found for cross-reference 'Snapshot': swh.fuse.fs.artifact.Snapshot, swh.model.model.Snapshot
    …/swh/loader/svn/directory.py:docstring of swh.loader.svn.directory.SvnDirectoryLoader.cnts:1:
        WARNING: more than one target found for cross-reference 'Content': swh.fuse.fs.artifact.Content, swh.model.from_disk.Content, swh.model.model.Content
    …/swh/loader/svn/directory.py:docstring of swh.loader.svn.directory.SvnDirectoryLoader.dirs:1:
        WARNING: more than one target found for cross-reference 'Directory': swh.fuse.fs.artifact.Directory, swh.model.from_disk.Directory, swh.model.model.Directory

vlorentz explained the cause:

> SvnDirectoryLoader inherits from BaseDirectoryLoader which inherits
> from NodeLoader, which defines:
>
>     self.snapshot: Optional[Snapshot] = None
>
> and it loses the annotation's value (only keeps its string
> representation) because of the inheritence:
> https://github.com/sphinx-doc/sphinx/issues/10124

In order to fix this, we now use a qualified type reference in the
initializers of NodeLoader and BaseDirectoryLoader.
parent 3481f121
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment