From 1512fb0740a6c4d70bc5268adb613c69da37ac13 Mon Sep 17 00:00:00 2001 From: withbest Date: Mon, 29 Jul 2024 00:44:55 +0800 Subject: [PATCH] chore: fix some comments Signed-off-by: withbest --- Makefile | 2 +- slither/core/declarations/function.py | 4 ++-- slither/core/declarations/solidity_variables.py | 2 +- slither/detectors/reentrancy/reentrancy.py | 2 +- slither/slithir/convert.py | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index a94c3eeb87..17697385ed 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ TEST_MODULE := tests ALL_PY_SRCS := $(shell find $(PY_MODULE) -name '*.py') \ $(shell find test -name '*.py') -# Optionally overriden by the user, if they're using a virtual environment manager. +# Optionally overridden by the user, if they're using a virtual environment manager. VENV ?= env # On Windows, venv scripts/shims are under `Scripts` instead of `bin`. diff --git a/slither/core/declarations/function.py b/slither/core/declarations/function.py index 6e8968dfb2..6f9a8ac407 100644 --- a/slither/core/declarations/function.py +++ b/slither/core/declarations/function.py @@ -776,14 +776,14 @@ def add_explicit_base_constructor_calls_statements(self, modif: ModifierStatemen def variables(self) -> List[LocalVariable]: """ Return all local variables - Include paramters and return values + Include parameters and return values """ return list(self._variables.values()) @property def local_variables(self) -> List[LocalVariable]: """ - Return all local variables (dont include paramters and return values) + Return all local variables (dont include parameters and return values) """ return list(set(self.variables) - set(self.returns) - set(self.parameters)) diff --git a/slither/core/declarations/solidity_variables.py b/slither/core/declarations/solidity_variables.py index 8094ab7c35..2ff8260900 100644 --- a/slither/core/declarations/solidity_variables.py +++ b/slither/core/declarations/solidity_variables.py @@ -82,7 +82,7 @@ "abi.encodeCall()": ["bytes"], "bytes.concat()": ["bytes"], "string.concat()": ["string"], - # abi.decode returns an a list arbitrary types + # abi.decode returns a list arbitrary types "abi.decode()": [], "type(address)": [], "type()": [], # 0.6.8 changed type(address) to type() diff --git a/slither/detectors/reentrancy/reentrancy.py b/slither/detectors/reentrancy/reentrancy.py index 8dd9aecc05..6545615cc9 100644 --- a/slither/detectors/reentrancy/reentrancy.py +++ b/slither/detectors/reentrancy/reentrancy.py @@ -195,7 +195,7 @@ def does_not_bring_new_info(self, new_info: "AbstractState") -> bool: def _filter_if(node: Node) -> bool: """ - Check if the node is a condtional node where + Check if the node is a conditional node where there is an external call checked Heuristic: - The call is a IF node diff --git a/slither/slithir/convert.py b/slither/slithir/convert.py index 7d8aa543bf..93f1524dcc 100644 --- a/slither/slithir/convert.py +++ b/slither/slithir/convert.py @@ -995,7 +995,7 @@ def extract_tmp_call(ins: TmpCall, contract: Optional[Contract]) -> Union[Call, # Support for library call where the parameter is a function # We could merge this with the standard library handling # Except that we will have some troubles with using_for - # As the type of the funciton will not match function() + # As the type of the function will not match function() # Additionally we do not have a correct view on the parameters of the tmpcall # At this level # @@ -1237,7 +1237,7 @@ def convert_to_low_level( ) -> Union[Send, LowLevelCall, Transfer,]: """ Convert to a transfer/send/or low level call - The funciton assume to receive a correct IR + The function assume to receive a correct IR The checks must be done by the caller Must be called after can_be_low_level