From 792321f531303216647ba0161f83212f8d9317c8 Mon Sep 17 00:00:00 2001 From: Josselin Feist Date: Tue, 26 Jul 2022 10:14:06 +0200 Subject: [PATCH] Fix naming --- slither/solc_parsing/expressions/find_variable.py | 4 ++-- slither/solc_parsing/yul/parse_yul.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/slither/solc_parsing/expressions/find_variable.py b/slither/solc_parsing/expressions/find_variable.py index d1236f78e..33c342097 100644 --- a/slither/solc_parsing/expressions/find_variable.py +++ b/slither/solc_parsing/expressions/find_variable.py @@ -98,7 +98,7 @@ def _find_variable_in_function_parser( return None -def _find_top_level( +def find_top_level( var_name: str, scope: "FileScope" ) -> Tuple[ Optional[Union[Enum, Structure, SolidityImportPlaceHolder, CustomError, TopLevelVariable]], bool @@ -402,7 +402,7 @@ def find_variable( return SolidityFunction(var_name), False # Top level must be at the end, if nothing else was found - ret, var_was_created = _find_top_level(var_name, current_scope) + ret, var_was_created = find_top_level(var_name, current_scope) if ret: return ret, var_was_created diff --git a/slither/solc_parsing/yul/parse_yul.py b/slither/solc_parsing/yul/parse_yul.py index 7bd4f4e1f..05974ae65 100644 --- a/slither/solc_parsing/yul/parse_yul.py +++ b/slither/solc_parsing/yul/parse_yul.py @@ -35,7 +35,7 @@ from slither.solc_parsing.yul.evm_functions import ( unary_ops, binary_ops, ) -from slither.solc_parsing.expressions.find_variable import _find_top_level +from slither.solc_parsing.expressions.find_variable import find_top_level from slither.visitors.expression.find_calls import FindCalls from slither.visitors.expression.read_var import ReadVar from slither.visitors.expression.write_var import WriteVar @@ -798,7 +798,7 @@ def parse_yul_identifier(root: YulScope, _node: YulNode, ast: Dict) -> Optional[ if magic_suffix: return magic_suffix - ret, _ = _find_top_level(name, root.contract.file_scope) + ret, _ = find_top_level(name, root.contract.file_scope) if ret: return Identifier(ret)