def parse_raises(self, contents):
        regex = re.compile(r'^\s*(raise) (\w+)', re.MULTILINE)
        match = re.findall(regex, contents)

        if len(match) == 0:
            return None

        raises = []
        for exception in match:
            raises.append(exception[1])

        return raises
Finds instances of raised exceptions in the definition.
dataset/ETHPy150Open adambullmer/sublime_docblockr_python/parsers/parser.py/PythonParser.parse_raises