Skip to content

Commit

Permalink
#864dwm0ak - CR
Browse files Browse the repository at this point in the history
  • Loading branch information
meevee98 committed Apr 14, 2023
1 parent 4e59d74 commit b9d919d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions boa3/internal/analyser/analyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
"""
Expand All @@ -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)

Expand Down

0 comments on commit b9d919d

Please sign in to comment.