Skip to content

Commit

Permalink
remove redundand calls
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzocerrone committed Nov 14, 2024
1 parent 8a809ea commit 65cb234
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ngio/tables/_ad_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ def callback(func: Callable, elem_name: str, elem: Any, iospec: Any) -> Any:
if iospec.encoding_type == "anndata" or elem_name.endswith("/"):
ad_kwargs = {}
base_elem = [
"X",
"layers",
"obs",
"var",
"obsm",
"varm",
"obsp",
"varp",
"uns",
"layers",
"X",
"var",
"varm",
"varp",
]
# This should make sure that the function behaves the same as the original
# implementation.
base_elem += list(elem.keys())
for k in base_elem:
for k in set(base_elem):
v = elem.get(k)
if v is not None and not k.startswith("raw."):
ad_kwargs[k] = read_dispatched(v, callback)
Expand Down

0 comments on commit 65cb234

Please sign in to comment.