From 2168d6a0f0bb47377912e4c683231c9caf93b299 Mon Sep 17 00:00:00 2001 From: Joyce Yan <5653616+joyceyan@users.noreply.github.com> Date: Wed, 11 Oct 2023 18:18:22 -0400 Subject: [PATCH] rm unnecessary function --- cellxgene_schema_cli/cellxgene_schema/validate.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cellxgene_schema_cli/cellxgene_schema/validate.py b/cellxgene_schema_cli/cellxgene_schema/validate.py index f98076fd8..6431b7cf8 100644 --- a/cellxgene_schema_cli/cellxgene_schema/validate.py +++ b/cellxgene_schema_cli/cellxgene_schema/validate.py @@ -766,7 +766,7 @@ def _validate_colors_in_uns_dict(self, uns_dict: dict) -> None: # Skip over all subsequent validations which expect a numpy array continue # 3. Verify that we have strings in the array - all_strings = all(self._validate_string(color) for color in value) + all_strings = all(isinstance(color, str) for color in value) if not all_strings: self.errors.append( f"Colors in uns[{key}] must be strings. Found: {value} which are {value.dtype.name}" @@ -787,9 +787,6 @@ def _validate_colors_in_uns_dict(self, uns_dict: dict) -> None: f"Colors in uns[{key}] must be either all hex colors or all CSS4 named colors. Found: {value}" ) - def _validate_string(self, color: Any) -> bool: - return isinstance(color, str) - def _validate_css4_color(self, color: Any) -> bool: if not isinstance(color, str): return False