chore: remove repetitive words

Signed-off-by: majorteach <csgcgl@126.com>
pull/2373/head
majorteach 8 months ago
parent 1ed85707ab
commit cac1252706
  1. 2
      slither/core/declarations/contract.py
  2. 2
      slither/vyper_parsing/declarations/function.py

@ -894,7 +894,7 @@ class Contract(SourceMapping): # pylint: disable=too-many-public-methods
def get_function_from_canonical_name(self, canonical_name: str) -> Optional["Function"]: def get_function_from_canonical_name(self, canonical_name: str) -> Optional["Function"]:
""" """
Return a function from a a canonical name (contract.signature()) Return a function from a canonical name (contract.signature())
Args: Args:
canonical_name (str): canonical name of the function (without return statement) canonical_name (str): canonical name of the function (without return statement)
Returns: Returns:

@ -554,7 +554,7 @@ class FunctionVyper: # pylint: disable=too-many-instance-attributes
def _parse_returns(self, returns: Union[Name, TupleVyper, Subscript]): def _parse_returns(self, returns: Union[Name, TupleVyper, Subscript]):
self._function.returns_src().set_offset(returns.src, self._function.compilation_unit) self._function.returns_src().set_offset(returns.src, self._function.compilation_unit)
# Only the type of the arg is given, not a name. We create an an `Arg` with an empty name # Only the type of the arg is given, not a name. We create an `Arg` with an empty name
# so that the function has the correct return type in its signature but doesn't clash with # so that the function has the correct return type in its signature but doesn't clash with
# other identifiers during name resolution (`find_variable`). # other identifiers during name resolution (`find_variable`).
if isinstance(returns, (Name, Subscript)): if isinstance(returns, (Name, Subscript)):

Loading…
Cancel
Save