Fix incorrect summary in printerQuickSummary

Typo in contract.get_summary documentation
Clean code
pull/15/head
Josselin 6 years ago
parent 0c772b2dd7
commit 94c0114536
  1. 2
      slither/core/declarations/contract.py
  2. 6
      slither/printers/summary/printerQuickSummary.py
  3. 2
      slither/printers/summary/printerSummary.py

@ -290,7 +290,7 @@ class Contract(ChildSlither, SourceMapping):
""" Return the function summary
Returns:
(str, list, list, list): (name, variables, fuction summaries, modifier summaries)
(str, list, list, list, list): (name, inheritances, variables, fuction summaries, modifier summaries)
"""
func_summaries = [f.get_summary() for f in self.functions]
modif_summaries = [f.get_summary() for f in self.modifiers]

@ -19,13 +19,13 @@ class PrinterQuickSummary(AbstractPrinter):
txt = ""
for c in self.contracts:
(name, var, func_summaries, modif_summaries) = c.get_summary()
(name, _inheritances, _var, func_summaries, _modif_summaries) = c.get_summary()
txt += blue("\n+ Contract %s\n"%name)
for (f_name, visi, modifiers, read, write, calls) in func_summaries:
for (f_name, visi, _modifiers, _read, _write, _calls) in func_summaries:
txt += " - "
if visi in ['external', 'public']:
txt += green("%s (%s)\n"%(f_name, visi))
elif visi in ['internal','private']:
elif visi in ['internal', 'private']:
txt += magenta("%s (%s)\n"%(f_name, visi))
else:
txt += "%s (%s)\n"%(f_name, visi)

@ -27,7 +27,7 @@ class PrinterSummary(AbstractPrinter):
"""
for c in self.contracts:
(name, var, inheritances, func_summaries, modif_summaries) = c.get_summary()
(name, inheritances, var, func_summaries, modif_summaries) = c.get_summary()
txt = "\nContract %s"%name
txt += '\nContract vars: '+str(var)
txt += '\nInheritances:: '+str(inheritances)

Loading…
Cancel
Save