astroquery/utils/cleanup_downloads.py
def cleanup_saved_downloads(names):
    """ Function to clean up save files.

    Parameters
    ----------
    names : str or list of str
        Files or directories to clean up. Wildcards are accepted.
    """

    if isinstance(names, str):
        names = [names]

    for path in names:
        files = glob.glob(path)
        for saved_download in files:
            try:
                shutil.rmtree(saved_download)
            except NotADirectoryError:
                os.remove(saved_download)
 Function to clean up save files.

    Parameters
    ----------
    names : str or list of str
        Files or directories to clean up. Wildcards are accepted.
    
Function to clean up save files.
Parameters

names : str or list of str
Files or directories to clean up. Wildcards are accepted.
Function to clean up save files . Parameters names : str or list of str Files or directories to clean up . Wildcards are accepted .
def cleanup_saved_downloads(names):
    if isinstance(names, str):
        names = [names]
    for path in names:
        files = glob.glob(path)
        for saved_download in files:
            try:
                shutil.rmtree(saved_download)
            except NotADirectoryError:
                os.remove(saved_download)
def cleanup_saved_downloads ( names ) : if isinstance ( names , str ) : names = [ names ] for path in names : files = glob . glob ( path ) for saved_download in files : try : shutil . rmtree ( saved_download ) except NotADirectoryError : os . remove ( saved_download )
Function to clean up save files.
Function to clean up save files .
""" Function to clean up save files.

    Parameters
    ----------
    names : str or list of str
        Files or directories to clean up. Wildcards are accepted.
    """
names