Skip to content

Commit c5750ea

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 45d4de7 commit c5750ea

1 file changed

Lines changed: 9 additions & 12 deletions

File tree

src/scrnaseq/list_datasets.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,24 +122,21 @@ def _sanitize_query_to_output(results: list, latest: bool, meta_name: str = "met
122122
)
123123
df["column_annotations"] = _extract_charlist_from_json(
124124
_all_metas,
125-
lambda x: x.get("applications", {})
126-
.get("takane", {})
127-
.get("summarized_experiment", {})
128-
.get("column_annotations"),
125+
lambda x: (
126+
x.get("applications", {}).get("takane", {}).get("summarized_experiment", {}).get("column_annotations")
127+
),
129128
)
130129
df["reduced_dimensions"] = _extract_charlist_from_json(
131130
_all_metas,
132-
lambda x: x.get("applications", {})
133-
.get("takane", {})
134-
.get("single_cell_experiment", {})
135-
.get("reduced_dimensions"),
131+
lambda x: (
132+
x.get("applications", {}).get("takane", {}).get("single_cell_experiment", {}).get("reduced_dimensions")
133+
),
136134
)
137135
df["alternative_experiments"] = _extract_charlist_from_json(
138136
_all_metas,
139-
lambda x: x.get("applications", {})
140-
.get("takane", {})
141-
.get("single_cell_experiment", {})
142-
.get("alternative_experiments"),
137+
lambda x: (
138+
x.get("applications", {}).get("takane", {}).get("single_cell_experiment", {}).get("alternative_experiments")
139+
),
143140
)
144141

145142
df["bioconductor_version"] = _extract_atomic_from_json(_all_metas, lambda x: x.get("bioconductor_version"))

0 commit comments

Comments
 (0)