Skip to content

Commit

Permalink
Fix pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Jan 16, 2024
1 parent 0dceb29 commit 3456e15
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/podio/root_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from podio.base_reader import BaseReaderMixin # pylint: disable=wrong-import-position
from podio.base_writer import BaseWriterMixin # pylint: disable=wrong-import-position


class AllWriters:
"""Class to manage all writers in the program
so that they can be properly finished at the end of the program
Expand All @@ -23,13 +24,15 @@ def finish(self):
"""Finish all managed writers"""
for writer in self.writers:
try:
writer._writer.finish()
writer._writer.finish() # pylint: disable=protected-access
except AttributeError:
pass


_all_writers = AllWriters()
atexit.register(_all_writers.finish)


class Reader(BaseReaderMixin):
"""Reader class for reading podio root files."""

Expand Down

0 comments on commit 3456e15

Please sign in to comment.