format with black==19.10b0

pull/730/head
Maximilian Krueger 4 years ago
parent 12e514437f
commit 5a78c7dfef
  1. 4
      slither/solc_parsing/expressions/expression_parsing.py
  2. 3
      slither/solc_parsing/solidity_types/type_parsing.py

@ -674,7 +674,9 @@ def parse_expression(expression: Dict, caller_context: CallerContext) -> "Expres
if name == "MemberAccess":
if caller_context.is_compact_ast:
member_name = expression["memberName"]
member_type = parse_type(UnknownType(expression["typeDescriptions"]["typeString"]), caller_context)
member_type = parse_type(
UnknownType(expression["typeDescriptions"]["typeString"]), caller_context
)
member_expression = parse_expression(expression["expression"], caller_context)
else:
member_name = expression["attributes"]["member_name"]

@ -104,7 +104,8 @@ def _find_from_type_name( # pylint: disable=too-many-locals,too-many-branches,t
if not var_type:
if name.startswith("function "):
found = re.findall(
"function \(([ ()\[\]a-zA-Z0-9\.,]*?)\)(?: payable)?(?: (?:external|internal|pure|view))?(?: returns \(([a-zA-Z0-9() \.,]*)\))?", name
"function \(([ ()\[\]a-zA-Z0-9\.,]*?)\)(?: payable)?(?: (?:external|internal|pure|view))?(?: returns \(([a-zA-Z0-9() \.,]*)\))?",
name,
)
assert len(found) == 1
params = [v for v in found[0][0].split(",") if v != ""]

Loading…
Cancel
Save