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

Fixed Improper Method Call: __exit__() #2402

Merged
merged 4 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -583,3 +583,8 @@ authors:

- given-names: Oscar
alias: 0scvr

- given-names: Ataf Fazledin
family-names: Ahamed
affiliation: OpenRefactory Inc.
alias: fazledyn-or
1 change: 1 addition & 0 deletions changelog/2402.bugfix.rst
ejohnson-96 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Modified |__exit__| method of |HDF5Reader| for context management
2 changes: 1 addition & 1 deletion plasmapy/plasma/sources/openpmd_hdf5.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __enter__(self):
def close(self):
self.h5.close()

def __exit__(self): # noqa: PLE0302, PYI036
def __exit__(self, exc_type, exc_value, traceback):
self.h5.close()

def _check_valid_openpmd_version(self):
Expand Down