Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure random_state is a list before indexed assignment (capitalon…
…e#968) * Make sure random_state is a list before indexed assignment Currently, a mypy error occurs because we attempt to assign to random_state[1] when random_state has type Union[list[Any], tuple[Any]]. Tuples are immutable so this is a type error. We fix this by making random_state into a list before doing indexed assignment on it. * Add type guards for random_state * Check random_state before random_state[1] Co-authored-by: Michael Davis <[email protected]> * Reorder conditions for consistency Co-authored-by: Taylor Turner <[email protected]> --------- Co-authored-by: Michael Davis <[email protected]> Co-authored-by: Taylor Turner <[email protected]>
- Loading branch information