-
-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Mypy fixes * backwards compat * Fix mistake get rid of Any import * Try to get lint passing * Ignore type setting Co-authored-by: Tom Augspurger <[email protected]>
- Loading branch information
1 parent
09d4ec0
commit be99d37
Showing
7 changed files
with
32 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
from typing import TypeVar, Union | ||
from typing import Any, Sequence, TypeVar, Union | ||
|
||
import dask.dataframe as dd | ||
import numpy as np | ||
from dask.array import Array | ||
from pandas import DataFrame, Index, Series | ||
|
||
try: | ||
from numpy.typing import DTypeLike | ||
except ImportError: | ||
DTypeLike = Any # type: ignore | ||
|
||
|
||
AnyArrayLike = TypeVar("AnyArrayLike", Index, Series, Array, np.ndarray) | ||
ArrayLike = TypeVar("ArrayLike", Array, np.ndarray) | ||
FrameOrSeriesUnion = Union[DataFrame, Series, dd.Series, dd.DataFrame] | ||
SeriesType = Union[dd.Series, Series] | ||
DataFrameType = Union[DataFrame, dd.DataFrame] | ||
Number = Union[int, float, np.float64, np.int64, np.int32] | ||
Int = Union[int, np.int64, np.int32] | ||
NDArrayOrScalar = Union[np.ndarray, Sequence[Number], Number] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters