Skip to content

Commit b0081b1

Browse files
author
Marcel Strzys
committed
<style> updated the style of the changes to address commments in the MR
1 parent 588bb61 commit b0081b1

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/pybkgmodel/data.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -585,11 +585,10 @@ def is_compatible(cls, file_name):
585585
compatible = False
586586

587587
try:
588-
with fits.open(ext) as file:
589-
pass
590-
compatible = True
588+
with fits.open(ext):
589+
compatible = True
591590
except OSError:
592-
compatible = False
591+
pass
593592

594593
return compatible
595594

@@ -646,8 +645,8 @@ def load_events(cls, file_name):
646645
'ENERGY': 'event_energy',
647646
}
648647

649-
with fits.open(file_name, memmap=False) as input_file, \
650-
erfa_astrom.set(ErfaAstromInterpolator(1 * u.s)):
648+
with (fits.open(file_name, memmap=False) as input_file,
649+
erfa_astrom.set(ErfaAstromInterpolator(1 * u.s))):
651650
try:
652651
evt_hdu = input_file["EVENTS"]
653652
evt_head = evt_hdu.header

0 commit comments

Comments
 (0)