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
tserg authored Jul 12, 2023
2 parents 7cb9e2c + a56570c commit d3575c6
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 d3575c6

Please sign in to comment.