Skip to content

Commit

Permalink
fix: prevent a ResourceWarning: unclosed file in output.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG committed Jul 12, 2023
1 parent 6a6a639 commit a56570c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions medusa/utils/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ def format_analysis(analysis: dict[str, set[vy_ast.VyperNode]]):


def write_analysis(analysis: str, file_name: str):
f = open(file_name, "w")
f.write(analysis)
with open(file_name, "w") as fh:
fh.write(analysis)

0 comments on commit a56570c

Please sign in to comment.