Skip to content

Commit

Permalink
Refactor read function to use context manager for file handling (#8967)
Browse files Browse the repository at this point in the history
Co-authored-by: Mahdi <mahdi@Mahdis-MacBook-Pro.local>
  • Loading branch information
mahdirahimi1999 and Mahdi committed May 2, 2023
1 parent f1a11d4 commit d14eb75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@


def read(f):
return open(f, 'r', encoding='utf-8').read()
with open(f, 'r', encoding='utf-8') as file:
return file.read()


def get_version(package):
Expand Down

0 comments on commit d14eb75

Please sign in to comment.