(
cls,
name, # type: str
content, # type: str
argv0=None, # type: Optional[str]
)
| 800 | |
| 801 | @classmethod |
| 802 | def execute_content( |
| 803 | cls, |
| 804 | name, # type: str |
| 805 | content, # type: str |
| 806 | argv0=None, # type: Optional[str] |
| 807 | ): |
| 808 | # type: (...) -> Any |
| 809 | try: |
| 810 | program = compile(content, name, "exec", flags=0, dont_inherit=1) |
| 811 | except SyntaxError as e: |
| 812 | return "Unable to parse {}: {}".format(name, e) |
| 813 | return cls.execute_ast(name, program, argv0=argv0) |
| 814 | |
| 815 | @classmethod |
| 816 | def execute_ast( |
no test coverage detected