Fix test errors

caused by `attributes["documentation"] = None"`
pull/1517/head
webthethird 2 years ago
parent 5b14dae8b6
commit afced5cc92
  1. 6
      slither/solc_parsing/declarations/contract.py

@ -703,7 +703,11 @@ class ContractSolc(CallerContextExpression):
self._customErrorParsed = []
def _handle_comment(self, attributes: Dict):
if "documentation" in attributes and "text" in attributes["documentation"]:
if (
"documentation" in attributes
and attributes["documentation"] is not None
and "text" in attributes["documentation"]
):
candidates = attributes["documentation"]["text"].replace("\n", ",").split(",")
for candidate in candidates:

Loading…
Cancel
Save