def parse_text(self, text: str, exclude: str = "nocover") -> PythonParser:
        """Parse `text` as source, and return the `PythonParser` used."""
        text = textwrap.dedent(text)
        parser = PythonParser(text=text, exclude=exclude)
        parser.parse_source()
        return parser
Parse `text` as source, and return the `PythonParser` used.
tests/test_parser.py