Skip to content

Commit

Permalink
make pylint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
samczsun committed Sep 11, 2020
1 parent 4c2c2d2 commit d6f1728
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions slither/printers/functions/cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class CFG(AbstractPrinter):

WIKI = "https://github.com/trailofbits/slither/wiki/Printer-documentation#cfg"

def output(self, filename_origin):
def output(self, filename):
"""
_filename is not used
Args:
Expand All @@ -21,15 +21,15 @@ def output(self, filename_origin):
if contract.is_top_level:
continue
for function in contract.functions + contract.modifiers:
if filename_origin:
filename = "{}-{}-{}.dot".format(filename_origin, contract.name, function.full_name)
if filename:
new_filename = "{}-{}-{}.dot".format(filename, contract.name, function.full_name)
else:
filename = "{}-{}.dot".format(contract.name, function.full_name)
info += "Export {}\n".format(filename)
new_filename = "{}-{}.dot".format(contract.name, function.full_name)
info += "Export {}\n".format(new_filename)
content = function.slithir_cfg_to_dot_str()
with open(filename, "w", encoding="utf8") as f:
with open(new_filename, "w", encoding="utf8") as f:
f.write(content)
all_files.append((filename, content))
all_files.append((new_filename, content))

self.info(info)

Expand Down

0 comments on commit d6f1728

Please sign in to comment.