Skip to content

Commit

Permalink
Closes #3842: Fixes mypy CI failures (#3843)
Browse files Browse the repository at this point in the history
This PR (closes #3842) fixes failures with mypy version 1.12 (released yesterday)

Co-authored-by: Tess Hayes <[email protected]>
  • Loading branch information
stress-tess and stress-tess authored Oct 16, 2024
1 parent 8d2e09c commit ecf762e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 4 additions & 2 deletions arkouda/groupbyclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ def unique(
else:
unique_keys = tuple(a[unique_key_indices] for a in pda)
if return_groups:
groups = unique_keys, permutation, segments, nkeys
return *groups, unique_key_indices if return_indices else groups
if return_indices:
return unique_keys, permutation, segments, nkeys, unique_key_indices
else:
return unique_keys, permutation, segments, nkeys
else:
return unique_keys

Expand Down
11 changes: 7 additions & 4 deletions arkouda/pdarraycreation.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,10 +922,13 @@ def arange(*args, **kwargs) -> pdarray:
repMsg = generic_msg(
cmd="arange", args={"start": start, "stop": stop, "stride": stride, "dtype": arg_dtype}
)
return (
create_pdarray(repMsg, max_bits=max_bits)
if dtype == akint64
else array(create_pdarray(repMsg), max_bits=max_bits, dtype=dtype)
return cast(
pdarray,
(
create_pdarray(repMsg, max_bits=max_bits)
if dtype == akint64
else array(create_pdarray(repMsg), max_bits=max_bits, dtype=dtype)
),
)
else:
raise TypeError(
Expand Down

0 comments on commit ecf762e

Please sign in to comment.