justinfx/fileseq

Docstring rtype is often wrong

Narann opened this issue · 3 comments

Looks like there are many rtype when there should be type. Here is an example: https://github.com/sqlboy/fileseq/blob/e09461ae9a46860ee5c9c34f43fc9c5ca8caac87/src/fileseq/filesequence.py#L602

Param docstring is:

        :param pattern: the sequence pattern being searched for
        :rtype: str
        :param strictPadding: if True, ignore files with padding length different from pattern
        :rtype: bool
        :raises: :class:`fileseq.exceptions.FileSeqException` if no sequence is found on disk

Should be:

        :param pattern: the sequence pattern being searched for
        :type pattern: str
        :param strictPadding: if True, ignore files with padding length different from pattern
        :type strictPadding: bool
        :return: `FileSequence` instance matching the given `pattern`
        :rtype: :obj:`FileSequence`
        :raises: :class:`fileseq.exceptions.FileSeqException` if no sequence is found on disk

rtype documents the "returned type". type my_param documents the type of my_param.

Happy to accept a pull request to fix those. I would even love to see them converted to Google docstring instead :
http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html

WIP ;)

Closing this old issue since the doc updates had already been merged.