From b9d919d26bccbaa6afa70ddf237a9872271d5003 Mon Sep 17 00:00:00 2001 From: Mirella de Medeiros Date: Fri, 14 Apr 2023 16:55:20 -0300 Subject: [PATCH] #864dwm0ak - CR --- boa3/internal/analyser/analyser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boa3/internal/analyser/analyser.py b/boa3/internal/analyser/analyser.py index f4e98a81d..e026ca413 100644 --- a/boa3/internal/analyser/analyser.py +++ b/boa3/internal/analyser/analyser.py @@ -60,7 +60,7 @@ def __init__(self, ast_tree: ast.AST, path: str = None, project_root: str = None def analyse(path: str, log: bool = False, imported_files: Optional[Dict[str, Analyser]] = None, import_stack: Optional[List[str]] = None, - root: str = None, env: str = None, **kwargs) -> Analyser: + root: str = None, env: str = None, compiler_entry: bool = False) -> Analyser: """ Analyses the syntax of the Python code @@ -72,6 +72,7 @@ def analyse(path: str, log: bool = False, If it's not triggered by an import, must be None. :param root: the path of the project root that the current smart contract is part of. :param env: specific environment id to compile. + :param compiler_entry: Whether this is the entry compiler analyser. False by default. :return: a boolean value that represents if the analysis was successful :rtype: Analyser """ @@ -81,8 +82,7 @@ def analyse(path: str, log: bool = False, analyser = Analyser(ast_tree, path, root if isinstance(root, str) else path, env, log) CompiledMetadata.set_current_metadata(analyser.metadata) - from_compiler_entry = 'compiler_entry' in kwargs and kwargs['compiler_entry'] - if from_compiler_entry: + if compiler_entry: from boa3.internal.model.imports.builtin import CompilerBuiltin CompilerBuiltin.update_with_analyser(analyser)