Skip to content

Commit 2ca38bd

Browse files
committed
style fixes
1 parent dd1c65c commit 2ca38bd

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

astrocut/asdf_cutout.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ def fits_cutouts(self) -> List[fits.HDUList]:
114114
try:
115115
from stdatamodels import asdf_in_fits
116116
except ModuleNotFoundError:
117-
warnings.warn('The `stdatamodels` package is required for ASDF-in-FITS embedding. Skipping embedding for these cutouts. '
118-
'To install astrocut with optional `stdatamodels` support, run: pip install "astrocut[all]"', ModuleWarning)
117+
warnings.warn('The `stdatamodels` package is required for ASDF-in-FITS embedding. '
118+
'Skipping embedding for these cutouts. To install astrocut with optional '
119+
'`stdatamodels` support, run: pip install "astrocut[all]"', ModuleWarning)
119120
self._supports_stdatamodels = False
120121
else:
121122
warnings.warn('ASDF-in-FITS embedding requires Python 3.11 or higher. '
@@ -131,7 +132,7 @@ def fits_cutouts(self) -> List[fits.HDUList]:
131132

132133
# Create a primary FITS header to hold data and WCS
133134
primary_hdu = fits.PrimaryHDU(data=cutout.data, header=cutout.wcs.to_header(relax=True))
134-
primary_hdu.header['ORIG_FLE'] = file # Add original file to header
135+
primary_hdu.header['ORIG_FLE'] = str(file) # Add original file to header
135136
hdul = fits.HDUList([primary_hdu])
136137

137138
if self._supports_stdatamodels:

astrocut/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ class ModuleWarning(AstropyWarning):
5656
"""
5757
Warnings to do with optional modules.
5858
"""
59-
pass
59+
pass

0 commit comments

Comments
 (0)