(self, elem_raw, spaces='', docs_raw=None, quotes="'''", input_style=None, output_style=None,
                 first_line=False, trailing_space=True, type_stub=False, before_lim='', **kwargs)
:param elem_raw: raw data of the element (def or class).
        :param spaces: the leading whitespaces before the element
        :param docs_raw: the raw data of the docstring part if any.
        :param quotes: the type of quotes to use for output: ' ' ' or " " "
        :param style_in: docstring input style ('javadoc', 'reST', 'groups', 'numpydoc', 'google', None).
          If None will be autodetected
        :type style_in: string
        :param style_out: docstring output style ('javadoc', 'reST', 'groups', 'numpydoc', 'google')
        :type style_out: string
        :param first_line: indicate if description should start
          on first or second line
        :type first_line: boolean
        :param trailing_space: if set, a trailing space will be inserted in places where the user
          should write a description
        :type trailing_space: boolean
        :param type_stub: if set, an empty stub will be created for a parameter type
        :type type_stub: boolean
        :param before_lim: specify raw or unicode or format docstring type (ie. "r" for r'''... or "fu" for fu'''...)
:param elem_raw: raw data of the element (def or class).
        :param spaces: the leading whitespaces before the element
        :param docs_raw: the raw data of the docstring part if any.
        :param quotes: the type of quotes to use for output: ' ' ' or " " "
        :param style_in: docstring input style ('javadoc', 'reST', 'groups', 'numpydoc', 'google', None).
          If None will be autodetected
        :type style_in: string
        :param style_out: docstring output style ('javadoc', 'reST', 'groups', 'numpydoc', 'google')
        :type style_out: string
        :param first_line: indicate if description should start
          on first or second line
        :type first_line: boolean
        :param trailing_space: if set, a trailing space will be inserted in places where the user
          should write a description
        :type trailing_space: boolean
        :param type_stub: if set, an empty stub will be created for a parameter type
        :type type_stub: boolean
        :param before_lim: specify raw or unicode or format docstring type (ie. "r" for r'''... or "fu" for fu'''...)
: param elem_raw : raw data of the element ( def or class ) . : param spaces : the leading whitespaces before the element : param docs_raw : the raw data of the docstring part if any . : param quotes : the type of quotes to use for output : or : param style_in : docstring input style ( javadoc reST groups numpydoc google None ) . If None will be autodetected : type style_in : string : param style_out : docstring output style ( javadoc reST groups numpydoc google ) : type style_out : string : param first_line : indicate if description should start on first or second line : type first_line : boolean : param trailing_space : if set a trailing space will be inserted in places where the user should write a description : type trailing_space : boolean : param type_stub : if set an empty stub will be created for a parameter type : type type_stub : boolean : param before_lim : specify raw or unicode or format docstring type ( ie . r for r ... or fu for fu ... )
def __init__(self, elem_raw, spaces='', docs_raw=None, quotes="'''", input_style=None, output_style=None,
                 first_line=False, trailing_space=True, type_stub=False, before_lim='', **kwargs):
        """
        :param elem_raw: raw data of the element (def or class).
        :param spaces: the leading whitespaces before the element
        :param docs_raw: the raw data of the docstring part if any.
        :param quotes: the type of quotes to use for output: ' ' ' or " " "
        :param style_in: docstring input style ('javadoc', 'reST', 'groups', 'numpydoc', 'google', None).
          If None will be autodetected
        :type style_in: string
        :param style_out: docstring output style ('javadoc', 'reST', 'groups', 'numpydoc', 'google')
        :type style_out: string
        :param first_line: indicate if description should start
          on first or second line
        :type first_line: boolean
        :param trailing_space: if set, a trailing space will be inserted in places where the user
          should write a description
        :type trailing_space: boolean
        :param type_stub: if set, an empty stub will be created for a parameter type
        :type type_stub: boolean
        :param before_lim: specify raw or unicode or format docstring type (ie. "r" for r'''... or "fu" for fu'''...)

        """
        self.dst = DocsTools()
        self.before_lim = before_lim
        self.first_line = first_line
        self.trailing_space = ''
        self.type_stub = type_stub
        if trailing_space:
            self.trailing_space = ' '
        if docs_raw and not input_style:
            self.dst.autodetect_style(docs_raw)
        elif input_style:
            self.set_input_style(input_style)
        if output_style:
            self.set_output_style(output_style)
        self.element = {
            'raw': elem_raw,
            'name': None,
            'type': None,
            'params': [],
            'spaces': spaces,
            'rtype': None,
            }
        if docs_raw:
            docs_raw = docs_raw.strip()
            if docs_raw.startswith('"""') or docs_raw.startswith("'''"):
                docs_raw = docs_raw[3:]
            if docs_raw.endswith('"""') or docs_raw.endswith("'''"):
                docs_raw = docs_raw[:-3]
        self.docs = {
            'in': {
                'raw': docs_raw,
                'doctests': "",
                'desc': None,
                'params': [],
                'types': [],
                'return': None,
                'rtype': None,
                'raises': []
                },
            'out': {
                'raw': '',
                'desc': None,
                'params': [],
                'types': [],
                'return': None,
                'rtype': None,
                'raises': [],
                'spaces': spaces + ' ' * kwargs.get('indent', 2)
                }
            }
        if '\t' in spaces:
            self.docs['out']['spaces'] = spaces + '\t'
        elif (len(spaces) % 4) == 0 or spaces == '':
            # FIXME: should bug if tabs for class or function (as spaces=='')
            self.docs['out']['spaces'] = spaces + ' ' * 4
        self.parsed_elem = False
        self.parsed_docs = False
        self.generated_docs = False
        self._options = {
            'hint_rtype_priority': True,  # priority in type hint else in docstring
            'hint_type_priority': True,  # priority in type hint else in docstring
            'rst_type_in_param_priority': True,  # in reST docstring priority on type present in param else on type
        }

        self.parse_definition()
        self.quotes = quotes
def __init__ ( self , elem_raw , spaces = '' , docs_raw = None , quotes = "'''" , input_style = None , output_style = None , first_line = False , trailing_space = True , type_stub = False , before_lim = '' , * * kwargs ) : self . dst = DocsTools ( ) self . before_lim = before_lim self . first_line = first_line self . trailing_space = '' self . type_stub = type_stub if trailing_space : self . trailing_space = ' ' if docs_raw and not input_style : self . dst . autodetect_style ( docs_raw ) elif input_style : self . set_input_style ( input_style ) if output_style : self . set_output_style ( output_style ) self . element = { 'raw' : elem_raw , 'name' : None , 'type' : None , 'params' : [ ] , 'spaces' : spaces , 'rtype' : None , } if docs_raw : docs_raw = docs_raw . strip ( ) if docs_raw . startswith ( '"""' ) or docs_raw . startswith ( "'''" ) : docs_raw = docs_raw [ 3 : ] if docs_raw . endswith ( '"""' ) or docs_raw . endswith ( "'''" ) : docs_raw = docs_raw [ : - 3 ] self . docs = { 'in' : { 'raw' : docs_raw , 'doctests' : "" , 'desc' : None , 'params' : [ ] , 'types' : [ ] , 'return' : None , 'rtype' : None , 'raises' : [ ] } , 'out' : { 'raw' : '' , 'desc' : None , 'params' : [ ] , 'types' : [ ] , 'return' : None , 'rtype' : None , 'raises' : [ ] , 'spaces' : spaces + ' ' * kwargs . get ( 'indent' , 2 ) } } if '\t' in spaces : self . docs [ 'out' ] [ 'spaces' ] = spaces + '\t' elif ( len ( spaces ) % 4 ) == 0 or spaces == '' : # FIXME: should bug if tabs for class or function (as spaces=='') self . docs [ 'out' ] [ 'spaces' ] = spaces + ' ' * 4 self . parsed_elem = False self . parsed_docs = False self . generated_docs = False self . _options = { 'hint_rtype_priority' : True , # priority in type hint else in docstring 'hint_type_priority' : True , # priority in type hint else in docstring 'rst_type_in_param_priority' : True , # in reST docstring priority on type present in param else on type } self . parse_definition ( ) self . quotes = quotes