(self)
Sets the parameters with types, descriptions and default value if any
        taken from the input docstring and the signature parameters
Sets the parameters with types, descriptions and default value if any
        taken from the input docstring and the signature parameters
Sets the parameters with types descriptions and default value if any taken from the input docstring and the signature parameters
def _set_params(self):
        """Sets the parameters with types, descriptions and default value if any
        taken from the input docstring and the signature parameters"""
        # TODO: manage different in/out styles
        # convert the list of signature's extracted params into a dict with the names of param as keys
        sig_params = {e['param']: {'type': e['type'], 'default': e['default']} for e in self.element['params']}
        # convert the list of docsting's extracted params into a dict with the names of param as keys
        docs_params = {
            name: {
                'description': desc,
                'type': param_type,
            } for name, desc, param_type in self.docs['in']['params']
        }
        for name in sig_params:
            # WARNING: Note that if a param in docstring isn't in the signature params, it will be dropped
            sig_type, sig_default = sig_params[name]['type'], sig_params[name]['default']
            out_description = ""
            out_type = sig_type if sig_type else None
            out_default = sig_default if sig_default else None
            if name in docs_params:
                out_description = docs_params[name]['description']
                if not out_type or (not self._options['hint_type_priority'] and docs_params[name]['type']):
                    out_type = docs_params[name]['type']
            self.docs['out']['params'].append((name, out_description, out_type, out_default))
def _set_params ( self ) : # TODO: manage different in/out styles # convert the list of signature's extracted params into a dict with the names of param as keys sig_params = { e [ 'param' ] : { 'type' : e [ 'type' ] , 'default' : e [ 'default' ] } for e in self . element [ 'params' ] } # convert the list of docsting's extracted params into a dict with the names of param as keys docs_params = { name : { 'description' : desc , 'type' : param_type , } for name , desc , param_type in self . docs [ 'in' ] [ 'params' ] } for name in sig_params : # WARNING: Note that if a param in docstring isn't in the signature params, it will be dropped sig_type , sig_default = sig_params [ name ] [ 'type' ] , sig_params [ name ] [ 'default' ] out_description = "" out_type = sig_type if sig_type else None out_default = sig_default if sig_default else None if name in docs_params : out_description = docs_params [ name ] [ 'description' ] if not out_type or ( not self . _options [ 'hint_type_priority' ] and docs_params [ name ] [ 'type' ] ) : out_type = docs_params [ name ] [ 'type' ] self . docs [ 'out' ] [ 'params' ] . append ( ( name , out_description , out_type , out_default ) )