def parse_arguments(self, line):
        parsed_arguments = {
            'arguments': [],
            'keyword_arguments': [],
        }

        arguments = re.search(r'^\s*def \w*\((.*)\):\s*$', line)

        if not arguments:
            return None

        excluded_parameters = ['self', 'cls']
        arguments = split_by_commas(arguments.group(1))

        for argument in arguments:
            if argument in excluded_parameters:
                continue

            argument_type = 'keyword_arguments' if '=' in argument else 'arguments'
            params = self.process_variable(argument)
            parsed_arguments[argument_type].append(params)

        return parsed_arguments
Finds and parses each argument and keyword argument.
dataset/ETHPy150Open adambullmer/sublime_docblockr_python/parsers/parser.py/PythonParser.parse_arguments