Skip to content

Commit dad6bd5

Browse files
committed
Adjust manhole flags
1 parent 9d827fa commit dad6bd5

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

‎mautrix/util/manhole.py‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import asyncio
1515
import codeop
1616
import contextlib
17-
import functools
1817
import inspect
1918
import logging
2019
import os
@@ -75,15 +74,7 @@ class StatefulCommandCompiler(codeop.CommandCompiler):
7574

7675
def __init__(self) -> None:
7776
super().__init__()
78-
self.compiler = functools.partial(
79-
compile,
80-
optimize=1,
81-
flags=(
82-
ast.PyCF_ONLY_AST
83-
| codeop.PyCF_DONT_IMPLY_DEDENT
84-
| codeop.PyCF_ALLOW_INCOMPLETE_INPUT
85-
),
86-
)
77+
self.compiler.flags |= ast.PyCF_ONLY_AST
8778
self.buf = BytesIO()
8879

8980
def is_partial_command(self) -> bool:

0 commit comments

Comments
 (0)