Exception caught if the docstring generator should generate a docstring for a specific function

Issue #185 resolved
M. Gronle created an issue
# coding=iso-8859-15
"""
"""

import numpy as np
from typing import Union


class DummyClass():
    '''dummy docstring
    '''

    def __init__(self, x: np.ndarray, y: np.ndarray):
        # Bug if a auto-generated docstring is added before this line.
        # (only if it is added by typing three " or ' characters).
        pass

        return

    def _tempfunc(self, x: Union[float, np.ndarray], 
                 y: float, 
                 z: float) -> Union[float, np.ndarray]: 
        '''docstring

        Parameters
        ----------
        x : np.ndarray
            x values
        y : float
            temp
        z : float
            test

        Returns
        ----------
        np.ndarray
            function values
        '''
        return 0

If one types three ''' or “““ characters after the __init__ Method, an exception is shown in the command line. This is due to an error during the docstring generation.

Comments (1)

  1. Log in to comment