From aed9604c5e616053f9a062d00fb9c4cce5dcba82 Mon Sep 17 00:00:00 2001 From: Josselin Date: Fri, 11 Feb 2022 13:23:46 +0100 Subject: [PATCH] Minor --- slither/utils/source_mapping.py | 4 ++-- tests/test_ast_parsing.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/slither/utils/source_mapping.py b/slither/utils/source_mapping.py index 62f1c3374..3e2beb764 100644 --- a/slither/utils/source_mapping.py +++ b/slither/utils/source_mapping.py @@ -27,11 +27,11 @@ def get_definition(target: SourceMapping, crytic_compile: CryticCompile) -> Sour start_offset = txt.find(pattern) + 1 # remove the space - starting_line, starting_column = crytic_compile.get_line_and_character_from_offset( + starting_line, starting_column = crytic_compile.get_line_from_offset( target.source_mapping.filename, target.source_mapping.start + start_offset ) - ending_line, ending_column = crytic_compile.get_line_and_character_from_offset( + ending_line, ending_column = crytic_compile.get_line_from_offset( target.source_mapping.filename, target.source_mapping.start + start_offset + len(pattern) ) diff --git a/tests/test_ast_parsing.py b/tests/test_ast_parsing.py index a0ee17e38..959c82fe9 100644 --- a/tests/test_ast_parsing.py +++ b/tests/test_ast_parsing.py @@ -9,10 +9,10 @@ from typing import List, Dict from deepdiff import DeepDiff import pytest -from deepdiff import DeepDiff from crytic_compile import CryticCompile, save_to_zip from crytic_compile.utils.zip import load_from_zip + from slither import Slither from slither.printers.guidance.echidna import Echidna