Skip to content

Commit

Permalink
Merge pull request #594 from bashtage/update-types
Browse files Browse the repository at this point in the history
MAINT: Update typing to be more precise
  • Loading branch information
bashtage committed Jul 12, 2022
2 parents 599cb1d + 947540e commit 8002002
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/bootstrap/base.py
Expand Up @@ -614,7 +614,7 @@ def set_state(self, state: RandomStateState | dict[str, Any]) -> None:
self._generator.bit_generator.state = state
else:
assert isinstance(self._generator, RandomState)
self._generator.set_state(state) # typo: ignore
self._generator.set_state(state)

def seed(self, value: int | list[int] | Uint32Array) -> None:
"""
Expand Down
2 changes: 1 addition & 1 deletion arch/utility/array.py
Expand Up @@ -303,7 +303,7 @@ def find_index(s: AnyPandas, index: int | DateLike) -> int:
assert isinstance(index, (str, dt.datetime, np.datetime64, Timestamp))
date_index = to_datetime(index, errors="coerce")
# TODO: Bug in pandas-stubs does not return correct types when errors=coerce
if date_index is NaT: # typo: ignore
if date_index is NaT:
raise ValueError(f"{index} cannot be converted to datetime")
loc = np.argwhere(s.index == date_index).squeeze()
if loc.size == 0:
Expand Down

0 comments on commit 8002002

Please sign in to comment.