Skip to content

Commit ced653d

Browse files
committed
Address reviewer comments
1 parent 1989dff commit ced653d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎astropy/io/fits/connect.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ def write_table_fits(input, output, overwrite=False, append=False):
435435
----------
436436
input : Table
437437
The table to write out.
438-
output : str
438+
output : str or os.PathLike[str]
439439
The filename to write the table to.
440440
overwrite : bool
441441
Whether to overwrite any existing file without warning.
@@ -448,7 +448,7 @@ def write_table_fits(input, output, overwrite=False, append=False):
448448
table_hdu = table_to_hdu(input, character_as_bytes=True)
449449

450450
# Check if output file already exists
451-
if os.path.exists(output) and os.path.isfile(output):
451+
if os.path.isfile(output):
452452
if overwrite:
453453
os.remove(output)
454454
elif not append:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fix ``overwrite=True`` with FITS tables when the input filename is a ``Path``.
1+
File name could be passed as ``Path`` object to fits.write

0 commit comments

Comments
 (0)