Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor read function to use context manager for file handling #8967

Merged

Conversation

mahdirahimi1999
Copy link
Contributor

Description

This commit updates the read function to use a context manager when opening the file, ensuring that the file is properly closed after it has been read. This improves the code's readability and helps to prevent potential resource leaks.

@mahdirahimi1999
Copy link
Contributor Author

Please check this PR. @auvipy

@auvipy auvipy self-requested a review May 1, 2023 10:16
@mahdirahimi1999
Copy link
Contributor Author

Please check this PR. @auvipy

@auvipy auvipy merged commit d14eb75 into encode:master May 2, 2023
7 checks passed
@mahdirahimi1999 mahdirahimi1999 deleted the feature/improve-file-handling branch November 4, 2023 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants