From 2ad8a5a60dc03fa20d9927ccf8e7a04221ebefea Mon Sep 17 00:00:00 2001 From: John Kerl Date: Fri, 25 Oct 2024 15:16:45 -0400 Subject: [PATCH] code-review feedback Co-authored-by: nguyenv --- apis/python/src/tiledbsoma/_dataframe.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apis/python/src/tiledbsoma/_dataframe.py b/apis/python/src/tiledbsoma/_dataframe.py index c380fd20c5..dee770a08d 100644 --- a/apis/python/src/tiledbsoma/_dataframe.py +++ b/apis/python/src/tiledbsoma/_dataframe.py @@ -520,8 +520,8 @@ def _upgrade_or_change_domain_helper( dim_schema = pa.schema(dim_schema_list) # Convert the user's tuple of low/high pairs into a dict keyed by index-column name. - new_domain_dict: Dict[str, Iterable[Any]] = {} - for i, dim_name in enumerate(dim_names): + new_domain_dict: Dict[str, Domain] = {} + for dim_name, new_dom in zip(dim_names, newdomain): # Domain can't be specified for strings (core constraint) so let them keystroke that easily. if ( dim_schema.field(dim_name).type @@ -531,11 +531,11 @@ def _upgrade_or_change_domain_helper( pa.binary(), pa.large_binary(), ] - and newdomain[i] is None + and new_dom is None ): new_domain_dict[dim_name] = ("", "") else: - new_domain_dict[dim_name] = tuple(newdomain[i]) # type: ignore + new_domain_dict[dim_name] = tuple(new_dom) # type: ignore # Return this as a pyarrow table. This has n columns where n is the number of # index columns, and two rows: one row for the low values and one for the high values.