From c82a18a830fd7e65c00220635c733a55c96258bb Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Mon, 4 Nov 2024 11:41:11 +0100 Subject: [PATCH] fix some typing --- lib/python/pyflyby/_parse.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/python/pyflyby/_parse.py b/lib/python/pyflyby/_parse.py index 76fcacc9..b9347a55 100644 --- a/lib/python/pyflyby/_parse.py +++ b/lib/python/pyflyby/_parse.py @@ -677,7 +677,7 @@ def _ast_node_is_in_docstring_position(ast_node): return False -def infer_compile_mode(arg): +def infer_compile_mode(arg:str.AST) -> str: """ Infer the mode needed to compile ``arg``. @@ -1194,9 +1194,9 @@ def compile(self, mode: Optional[str] = None): ``CodeType`` """ ast_node = self.parse(mode=mode) - mode = infer_compile_mode(ast_node) + c_mode = infer_compile_mode(ast_node) filename = str(self.filename or "") - return compile(ast_node, filename, mode) + return compile(ast_node, filename, c_mode) @cached_property def statements(self) -> Tuple[PythonStatement, ...]: