Skip to content

Commit

Permalink
rm unnecessary function
Browse files Browse the repository at this point in the history
  • Loading branch information
joyceyan committed Oct 11, 2023
1 parent 1509fbb commit 2168d6a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cellxgene_schema_cli/cellxgene_schema/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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
Expand Down

0 comments on commit 2168d6a

Please sign in to comment.