(files: ty.Union[clean_file_t, ty.Iterable[clean_file_t]])
Generates tuples with a file-like object and a close indicator
	
	This is a generator of tuples, where the first element is the file object
	and the second element is a boolean which is True if this module opened the
	file (and thus should close it).
	
	Raises
	------
	OSError
		Accessing the given file path failed
	
	Parameters
	----------
	files
		Collection or single instance of a filepath and file-like object
Generates tuples with a file-like object and a close indicator
	
	This is a generator of tuples, where the first element is the file object
	and the second element is a boolean which is True if this module opened the
	file (and thus should close it).
	
	Raises
	------
	OSError
		Accessing the given file path failed
	
	Parameters
	----------
	files
		Collection or single instance of a filepath and file-like object
Generates tuples with a file - like object and a close indicator This is a generator of tuples where the first element is the file object and the second element is a boolean which is True if this module opened the file ( and thus should close it ) . Raises ------ OSError Accessing the given file path failed Parameters ---------- files Collection or single instance of a filepath and file - like object
def clean_files(files: ty.Union[clean_file_t, ty.Iterable[clean_file_t]]) \
    -> ty.Generator[ty.Tuple[ty.IO[bytes], bool], ty.Any, ty.Any]:
	"""Generates tuples with a file-like object and a close indicator
	
	This is a generator of tuples, where the first element is the file object
	and the second element is a boolean which is True if this module opened the
	file (and thus should close it).
	
	Raises
	------
	OSError
		Accessing the given file path failed
	
	Parameters
	----------
	files
		Collection or single instance of a filepath and file-like object
	"""
	if not isinstance(files, path_types) and not hasattr(files, "read"):
		for f in ty.cast(ty.Iterable[clean_file_t], files):
			yield clean_file(f)
	else:
		yield clean_file(ty.cast(clean_file_t, files))
def clean_files ( files : ty . Union [ clean_file_t , ty . Iterable [ clean_file_t ] ] ) -> ty . Generator [ ty . Tuple [ ty . IO [ bytes ] , bool ] , ty . Any , ty . Any ] : if not isinstance ( files , path_types ) and not hasattr ( files , "read" ) : for f in ty . cast ( ty . Iterable [ clean_file_t ] , files ) : yield clean_file ( f ) else : yield clean_file ( ty . cast ( clean_file_t , files ) )