Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
joyceyan committed Sep 21, 2023
1 parent 7c9ebbd commit 1e8c5a8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cellxgene_schema_cli/cellxgene_schema/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ def _validate_dataframe(self, df_name: str):
if "warning_message" in column_def:
self.warnings.append(column_def["warning_message"])
self._validate_column(column, column_name, df_name, column_def)

def _validate_colors_in_uns_dict(self, uns_dict: dict) -> None:
df = getattr_anndata(self.adata, "obs")
df_definition = self._get_component_def("obs")
Expand All @@ -726,7 +726,7 @@ def _validate_colors_in_uns_dict(self, uns_dict: dict) -> None:
if column_name not in df.columns:
# Skip this, dataframe validation should already append an error for this
continue

column = getattr(df, column_name)
if column.get("type") == "categorical":
category_mapping[column_name] = len(column.unique)
Expand All @@ -745,7 +745,6 @@ def _validate_colors_in_uns_dict(self, uns_dict: dict) -> None:
f"named color"
)


def _validate_color(self, color: str) -> bool:
css4_named_colors = [
"aliceblue",
Expand Down Expand Up @@ -1338,7 +1337,7 @@ def _deep_check(self):
"Validation of raw layer was not performed due to current errors, try again after "
"fixing current errors."
)

# Make sure that {column}_colors exists
self._validate_colors_in_uns_dict(uns_dict)

Expand Down

0 comments on commit 1e8c5a8

Please sign in to comment.