Skip to content

Replace io.open using pathlib #3839

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

arunpersaud
Copy link
Contributor

@arunpersaud arunpersaud commented Mar 29, 2025

Pull Request Checklist

  • I’ve read the guidelines for contributing.
  • I updated AUTHORS.txt and CHANGES.txt (if the change is non-trivial) and documentation (if applicable).
  • I tested my changes.

Description

Replaced io.open using pathlib. This reduces a bit of code (often two lines of with-statement and f.read() can be replaced with a single line).

Replaced code and ran pytest to check for errors (some pytests mocks will need to be updated).

I haven't replaced all io.open so far, but thought I already create a PR to get some initial feedback. Happy to continue this if PR is welcome.

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.

1 participant