From e2c327a65bc39090dcfaae4c442af1994acf7844 Mon Sep 17 00:00:00 2001 From: Alex Wolf Date: Wed, 7 Aug 2024 19:18:56 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20Rename=20VALID=5FSUFFIXES=20TO?= =?UTF-8?q?=20VALID=5FSIMPLE=5FSUFFIXES?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lamindb_setup/core/upath.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lamindb_setup/core/upath.py b/lamindb_setup/core/upath.py index e2aa67808..f6bf450ad 100644 --- a/lamindb_setup/core/upath.py +++ b/lamindb_setup/core/upath.py @@ -28,7 +28,7 @@ # also see https://gist.github.com/securifera/e7eed730cbe1ce43d0c29d7cd2d582f4 # ".gz" is not listed here as it typically occurs with another suffix # the complete list is at lamindb.core.storage._suffixes -VALID_SUFFIXES = { +VALID_SIMPLE_SUFFIXES = { # # without readers # @@ -73,7 +73,7 @@ def process_digits(suffix: str): return process_digits(path.suffix) total_suffix = "".join(path.suffixes) - if total_suffix in VALID_SUFFIXES: + if total_suffix in VALID_SIMPLE_SUFFIXES: return total_suffix elif total_suffix.endswith(tuple(VALID_COMPOSITE_SUFFIXES)): # below seems slow but OK for now @@ -91,7 +91,7 @@ def process_digits(suffix: str): # in COMPRESSION_SUFFIXES to detect something like .random.gz and then # add ".random.gz" but concluded it's too dangerous it's safer to just # use ".gz" in such a case - if path.suffixes[-2] in VALID_SUFFIXES: + if path.suffixes[-2] in VALID_SIMPLE_SUFFIXES: suffix = "".join(path.suffixes[-2:]) msg += f"inferring: '{suffix}'" # do not print a warning for things like .tar.gz, .fastq.gz @@ -102,7 +102,7 @@ def process_digits(suffix: str): msg += ( f"using only last suffix: '{suffix}' - if you want your composite" " suffix to be recognized add it to" - " lamindb.core.storage.VALID_SUFFIXES.add()" + " lamindb.core.storage.VALID_SIMPLE_SUFFIXES.add()" ) if print_hint: logger.hint(msg)