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

BUG: Fix tipsy file handler opening #4884

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

matthewturk
Copy link
Member

This should not change anything functionally, but can save some time for opening file handles that may be expensive.

Closes #4883.

@Xarthisius Xarthisius added the bug label Apr 26, 2024
@@ -209,7 +212,7 @@ def _read_particle_data_file(self, data_file, ptf, selector=None):

# close all file handles
f.close()
for fh in list(aux_fh.values()):
for fh in list(_aux_fh.values()):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you touched this line, might as well get rid of the unneeded cast to list

Suggested change
for fh in list(_aux_fh.values()):
for fh in _aux_fh.values():

@neutrinoceros neutrinoceros added the code frontends Things related to specific frontends label Apr 27, 2024
@chrishavlin
Copy link
Contributor

@yt-fido test this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug code frontends Things related to specific frontends
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: Only open auxilliary files for Tipsy as needed
4 participants