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

MAINT: remove unused system tool gunzip #3057

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions astroquery/utils/system_tools.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,6 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst

import gzip
import os
import shutil


def gunzip(filename):
""" Decompress a file with gzip.

Parameters
----------
filename : str
Fully qualified path of the file to decompress.

Returns
-------
filename : str
Name of the decompressed file (or input filename if gzip is not
available).
"""

# ".fz" denotes RICE rather than gzip compression
if not filename.endswith('.fz'):
with gzip.open(filename, 'rb') as f_in:
with open(filename.rsplit(".", 1)[0], 'wb') as f_out:
shutil.copyfileobj(f_in, f_out)
return filename.rsplit(".", 1)[0]
else:
return filename


# If there is an update issue of astropy#2793 that got merged, this should
Expand Down
18 changes: 0 additions & 18 deletions astroquery/utils/tests/test_system_tools.py

This file was deleted.