-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Make datetime generic over tzinfo #11844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
This is a trial to judge the impact of such a change that could prevent runtime errors due to mixing timezone-aware and unaware datetimes. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
While I think there's some promise in this approach, I struggle with |
|
I don't have much to add except to say that having this will be truly great, my code is littered with "aware"/"not aware" comments which really should be in the type, so I hope you can get it to work. (I haven't been bothered with it enough to use something like DataType yet). I am curious about two things:
|
It tried both, but both didn't work.
Exactly. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Looking at some of the primer output (unfortunately, there's a lot of spam):
Overall while I think that this generates quite a bit of churn, all that churn pays off by preventing really annoying and hard to spot tz awareness bugs. |
|
Nice to see this getting implemented in typeshed! Leaving this other attempt for reference: https://github.com/mttbernardini/datetypes A question I have is in regards of runtime behaviour. How does this PR tackle using the generic |
|
Great to see this happening! I hope that the stdlib itself can have an update to address the |
|
Diff from mypy_primer, showing the effect of this PR on open source code: pandera (https://github.com/pandera-dev/pandera)
- pandera/engines/pandas_engine.py:966: error: Argument 1 to "Timestamp" has incompatible type "Any | Hashable"; expected "integer[Any] | float | str | date | datetime | datetime64[date | int | None]" [arg-type]
+ pandera/engines/pandas_engine.py:966: error: Argument 1 to "Timestamp" has incompatible type "Any | Hashable"; expected "integer[Any] | float | str | date | datetime[Any] | datetime64[date | int | None]" [arg-type]
- pandera/engines/pandas_engine.py:967: error: Argument 1 to "Timestamp" has incompatible type "Any | Hashable"; expected "integer[Any] | float | str | date | datetime | datetime64[date | int | None]" [arg-type]
+ pandera/engines/pandas_engine.py:967: error: Argument 1 to "Timestamp" has incompatible type "Any | Hashable"; expected "integer[Any] | float | str | date | datetime[Any] | datetime64[date | int | None]" [arg-type]
- pandera/engines/pandas_engine.py:968: error: Argument 1 to "Timestamp" has incompatible type "Any | Hashable"; expected "integer[Any] | float | str | date | datetime | datetime64[date | int | None]" [arg-type]
+ pandera/engines/pandas_engine.py:968: error: Argument 1 to "Timestamp" has incompatible type "Any | Hashable"; expected "integer[Any] | float | str | date | datetime[Any] | datetime64[date | int | None]" [arg-type]
- pandera/strategies/pandas_strategies.py:67: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[True], axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> None
+ pandera/strategies/pandas_strategies.py:67: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime[Any] | timedelta | <15 more items> | None = ..., *, inplace: Literal[True], axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> None
- pandera/strategies/pandas_strategies.py:67: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[False] = ..., axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> Series[Any]
+ pandera/strategies/pandas_strategies.py:67: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime[Any] | timedelta | <15 more items> | None = ..., *, inplace: Literal[False] = ..., axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> Series[Any]
- pandera/strategies/pandas_strategies.py:69: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[True], axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> None
+ pandera/strategies/pandas_strategies.py:69: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime[Any] | timedelta | <15 more items> | None = ..., *, inplace: Literal[True], axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> None
- pandera/strategies/pandas_strategies.py:69: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[False] = ..., axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> Series[Any]
+ pandera/strategies/pandas_strategies.py:69: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime[Any] | timedelta | <15 more items> | None = ..., *, inplace: Literal[False] = ..., axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> Series[Any]
- pandera/strategies/pandas_strategies.py:70: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[True], axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> None
+ pandera/strategies/pandas_strategies.py:70: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime[Any] | timedelta | <15 more items> | None = ..., *, inplace: Literal[True], axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> None
- pandera/strategies/pandas_strategies.py:70: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime | timedelta | <15 more items> | None = ..., *, inplace: Literal[False] = ..., axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> Series[Any]
+ pandera/strategies/pandas_strategies.py:70: note: def mask(self, cond: Series[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | Callable[[Series[Any]], Series[builtins.bool]] | Callable[[Any], builtins.bool], other: str | bytes | date | datetime[Any] | timedelta | <15 more items> | None = ..., *, inplace: Literal[False] = ..., axis: Literal['index', 0] | None = ..., level: Hashable | None = ...) -> Series[Any]
spark (https://github.com/apache/spark)
- python/pyspark/sql/pandas/types.py:757: error: Argument 1 to "apply" of "Series" has incompatible type "Callable[[Any], Any | NaTType]"; expected "Callable[..., str | bytes | date | datetime | timedelta | <15 more items> | None]" [arg-type]
+ python/pyspark/sql/pandas/types.py:757: error: Argument 1 to "apply" of "Series" has incompatible type "Callable[[Any], Any | NaTType]"; expected "Callable[..., str | bytes | date | datetime[Any] | timedelta | <15 more items> | None]" [arg-type]
- python/pyspark/sql/pandas/types.py:757: error: Incompatible return value type (got "Any | NaTType", expected "str | bytes | date | datetime | timedelta | <15 more items> | None") [return-value]
+ python/pyspark/sql/pandas/types.py:757: error: Incompatible return value type (got "Any | NaTType", expected "str | bytes | date | datetime[Any] | timedelta | <15 more items> | None") [return-value]
- python/pyspark/pandas/indexing.py:177: error: Incompatible return value type (got "ndarray[tuple[int], dtype[Any]] | ExtensionArray | Any", expected "Series[Any] | DataFrame[Any] | int | float | bool | str | bytes | Decimal | date | datetime | None") [return-value]
+ python/pyspark/pandas/indexing.py:177: error: Incompatible return value type (got "ndarray[tuple[int], dtype[Any]] | ExtensionArray | Any", expected "Series[Any] | DataFrame[Any] | int | float | bool | str | bytes | Decimal | date | datetime[Any] | None") [return-value]
- python/pyspark/pandas/generic.py:2681: error: Incompatible return value type (got "Series[Any]", expected "int | float | bool | str | bytes | Decimal | date | datetime | None | tuple[int | float | bool | str | bytes | Decimal | date | datetime | None, ...] | None") [return-value]
+ python/pyspark/pandas/generic.py:2681: error: Incompatible return value type (got "Series[Any]", expected "int | float | bool | str | bytes | Decimal | date | datetime[Any] | None | tuple[int | float | bool | str | bytes | Decimal | date | datetime[Any] | None, ...] | None") [return-value]
- python/pyspark/pandas/generic.py:3088: error: Incompatible return value type (got "Series[Any] | pandas.core.frame.DataFrame | str | bytes | date | <9 more items>", expected "int | float | bool | str | bytes | Decimal | date | datetime | None | pyspark.pandas.frame.DataFrame[Any] | Series[Any]") [return-value]
+ python/pyspark/pandas/generic.py:3088: error: Incompatible return value type (got "Series[Any] | pandas.core.frame.DataFrame | str | bytes | date | <9 more items>", expected "int | float | bool | str | bytes | Decimal | date | datetime[Any] | None | pyspark.pandas.frame.DataFrame[Any] | Series[Any]") [return-value]
- python/pyspark/pandas/frame.py:3199: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime | timedelta] apply(self, f: Callable[..., S2 | NAType], axis: Literal['index', 0] = ..., raw: bool = ..., result_type: None = ..., args: Any = ..., **kwargs: Any) -> Series[S2]
+ python/pyspark/pandas/frame.py:3199: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime[Any] | timedelta] apply(self, f: Callable[..., S2 | NAType], axis: Literal['index', 0] = ..., raw: bool = ..., result_type: None = ..., args: Any = ..., **kwargs: Any) -> Series[S2]
- python/pyspark/pandas/frame.py:3199: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime | timedelta] apply(self, f: Callable[..., S2 | NAType], axis: Literal['index', 0] | Literal['columns', 1] = ..., raw: bool = ..., args: Any = ..., *, result_type: Literal['expand', 'reduce'], **kwargs: Any) -> Series[S2]
+ python/pyspark/pandas/frame.py:3199: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime[Any] | timedelta] apply(self, f: Callable[..., S2 | NAType], axis: Literal['index', 0] | Literal['columns', 1] = ..., raw: bool = ..., args: Any = ..., *, result_type: Literal['expand', 'reduce'], **kwargs: Any) -> Series[S2]
- python/pyspark/pandas/frame.py:3199: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime | timedelta] apply(self, f: Callable[..., S2 | NAType], raw: bool = ..., result_type: None = ..., args: Any = ..., *, axis: Literal['columns', 1], **kwargs: Any) -> Series[S2]
+ python/pyspark/pandas/frame.py:3199: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime[Any] | timedelta] apply(self, f: Callable[..., S2 | NAType], raw: bool = ..., result_type: None = ..., args: Any = ..., *, axis: Literal['columns', 1], **kwargs: Any) -> Series[S2]
- python/pyspark/pandas/frame.py:3217: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime | timedelta] apply(self, f: Callable[..., S2 | NAType], axis: Literal['index', 0] = ..., raw: bool = ..., result_type: None = ..., args: Any = ..., **kwargs: Any) -> Series[S2]
+ python/pyspark/pandas/frame.py:3217: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime[Any] | timedelta] apply(self, f: Callable[..., S2 | NAType], axis: Literal['index', 0] = ..., raw: bool = ..., result_type: None = ..., args: Any = ..., **kwargs: Any) -> Series[S2]
- python/pyspark/pandas/frame.py:3217: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime | timedelta] apply(self, f: Callable[..., S2 | NAType], axis: Literal['index', 0] | Literal['columns', 1] = ..., raw: bool = ..., args: Any = ..., *, result_type: Literal['expand', 'reduce'], **kwargs: Any) -> Series[S2]
+ python/pyspark/pandas/frame.py:3217: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime[Any] | timedelta] apply(self, f: Callable[..., S2 | NAType], axis: Literal['index', 0] | Literal['columns', 1] = ..., raw: bool = ..., args: Any = ..., *, result_type: Literal['expand', 'reduce'], **kwargs: Any) -> Series[S2]
- python/pyspark/pandas/frame.py:3217: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime | timedelta] apply(self, f: Callable[..., S2 | NAType], raw: bool = ..., result_type: None = ..., args: Any = ..., *, axis: Literal['columns', 1], **kwargs: Any) -> Series[S2]
+ python/pyspark/pandas/frame.py:3217: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime[Any] | timedelta] apply(self, f: Callable[..., S2 | NAType], raw: bool = ..., result_type: None = ..., args: Any = ..., *, axis: Literal['columns', 1], **kwargs: Any) -> Series[S2]
- python/pyspark/pandas/series.py:1210: note: def __getitem__(self, str | bytes | date | datetime | timedelta | <12 more items>, /) -> Any
+ python/pyspark/pandas/series.py:1210: note: def __getitem__(self, str | bytes | date | datetime[Any] | timedelta | <12 more items>, /) -> Any
- python/pyspark/pandas/series.py:1210: note: def __getitem__(self, Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | Index[Any] | Series[Any] | SequenceNotStr[float | str | Timestamp] | slice[Any, Any, Any] | tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...] | Sequence[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]] | Callable[..., Any], /) -> Series[Any]
+ python/pyspark/pandas/series.py:1210: note: def __getitem__(self, Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | Index[Any] | Series[Any] | SequenceNotStr[float | str | Timestamp] | slice[Any, Any, Any] | tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...] | Sequence[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]] | Callable[..., Any], /) -> Series[Any]
- python/pyspark/pandas/namespace.py:1920: note: def date_range(start: str | date | datetime | datetime64[date | int | None] | Timestamp, end: str | date | datetime | datetime64[date | int | None] | Timestamp, freq: str | BaseOffset | timedelta | None = ..., tz: str | tzinfo | int | None = ..., normalize: bool = ..., name: Hashable = ..., inclusive: Literal['both', 'neither'] | Literal['left', 'right'] = ..., unit: Literal['s', 'ms', 'us', 'ns'] | None = ...) -> DatetimeIndex
+ python/pyspark/pandas/namespace.py:1920: note: def date_range(start: str | date | datetime[Any] | datetime64[date | int | None] | Timestamp, end: str | date | datetime[Any] | datetime64[date | int | None] | Timestamp, freq: str | BaseOffset | timedelta | None = ..., tz: str | tzinfo | int | None = ..., normalize: bool = ..., name: Hashable = ..., inclusive: Literal['both', 'neither'] | Literal['left', 'right'] = ..., unit: Literal['s', 'ms', 'us', 'ns'] | None = ...) -> DatetimeIndex
- python/pyspark/pandas/namespace.py:1920: note: def date_range(start: str | date | datetime | datetime64[date | int | None] | Timestamp, end: str | date | datetime | datetime64[date | int | None] | Timestamp, periods: int, tz: str | tzinfo | int | None = ..., normalize: bool = ..., name: Hashable = ..., inclusive: Literal['both', 'neither'] | Literal['left', 'right'] = ..., unit: Literal['s', 'ms', 'us', 'ns'] | None = ...) -> DatetimeIndex
+ python/pyspark/pandas/namespace.py:1920: note: def date_range(start: str | date | datetime[Any] | datetime64[date | int | None] | Timestamp, end: str | date | datetime[Any] | datetime64[date | int | None] | Timestamp, periods: int, tz: str | tzinfo | int | None = ..., normalize: bool = ..., name: Hashable = ..., inclusive: Literal['both', 'neither'] | Literal['left', 'right'] = ..., unit: Literal['s', 'ms', 'us', 'ns'] | None = ...) -> DatetimeIndex
- python/pyspark/pandas/namespace.py:1920: note: def date_range(start: str | date | datetime | datetime64[date | int | None] | Timestamp, *, periods: int, freq: str | BaseOffset | timedelta | None = ..., tz: str | tzinfo | int | None = ..., normalize: bool = ..., name: Hashable = ..., inclusive: Literal['both', 'neither'] | Literal['left', 'right'] = ..., unit: Literal['s', 'ms', 'us', 'ns'] | None = ...) -> DatetimeIndex
+ python/pyspark/pandas/namespace.py:1920: note: def date_range(start: str | date | datetime[Any] | datetime64[date | int | None] | Timestamp, *, periods: int, freq: str | BaseOffset | timedelta | None = ..., tz: str | tzinfo | int | None = ..., normalize: bool = ..., name: Hashable = ..., inclusive: Literal['both', 'neither'] | Literal['left', 'right'] = ..., unit: Literal['s', 'ms', 'us', 'ns'] | None = ...) -> DatetimeIndex
- python/pyspark/pandas/namespace.py:1920: note: def date_range(*, end: str | date | datetime | datetime64[date | int | None] | Timestamp, periods: int, freq: str | BaseOffset | timedelta | None = ..., tz: str | tzinfo | int | None = ..., normalize: bool = ..., name: Hashable = ..., inclusive: Literal['both', 'neither'] | Literal['left', 'right'] = ..., unit: Literal['s', 'ms', 'us', 'ns'] | None = ...) -> DatetimeIndex
+ python/pyspark/pandas/namespace.py:1920: note: def date_range(*, end: str | date | datetime[Any] | datetime64[date | int | None] | Timestamp, periods: int, freq: str | BaseOffset | timedelta | None = ..., tz: str | tzinfo | int | None = ..., normalize: bool = ..., name: Hashable = ..., inclusive: Literal['both', 'neither'] | Literal['left', 'right'] = ..., unit: Literal['s', 'ms', 'us', 'ns'] | None = ...) -> DatetimeIndex
- python/pyspark/pandas/indexes/base.py:2244: error: Incompatible return value type (got "str | bytes | date | timedelta | datetime64[date | int | None] | <7 more items>", expected "int | float | bool | str | bytes | Decimal | date | datetime | None") [return-value]
+ python/pyspark/pandas/indexes/base.py:2244: error: Incompatible return value type (got "str | bytes | date | timedelta | datetime64[date | int | None] | <7 more items>", expected "int | float | bool | str | bytes | Decimal | date | datetime[Any] | None") [return-value]
freqtrade (https://github.com/freqtrade/freqtrade)
- freqtrade/data/metrics.py:258: error: Argument 1 to "abs" has incompatible type "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "SupportsAbs[object]" [arg-type]
+ freqtrade/data/metrics.py:258: error: Argument 1 to "abs" has incompatible type "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "SupportsAbs[object]" [arg-type]
- freqtrade/data/metrics.py:259: error: Argument "high_date" to "DrawDownResult" has incompatible type "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "Timestamp" [arg-type]
+ freqtrade/data/metrics.py:259: error: Argument "high_date" to "DrawDownResult" has incompatible type "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "Timestamp" [arg-type]
- freqtrade/data/metrics.py:260: error: Argument "low_date" to "DrawDownResult" has incompatible type "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "Timestamp" [arg-type]
+ freqtrade/data/metrics.py:260: error: Argument "low_date" to "DrawDownResult" has incompatible type "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "Timestamp" [arg-type]
- freqtrade/data/metrics.py:261: error: Argument "high_value" to "DrawDownResult" has incompatible type "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "float" [arg-type]
+ freqtrade/data/metrics.py:261: error: Argument "high_value" to "DrawDownResult" has incompatible type "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "float" [arg-type]
- freqtrade/data/metrics.py:262: error: Argument "low_value" to "DrawDownResult" has incompatible type "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "float" [arg-type]
+ freqtrade/data/metrics.py:262: error: Argument "low_value" to "DrawDownResult" has incompatible type "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "float" [arg-type]
- freqtrade/data/metrics.py:263: error: Argument "relative_account_drawdown" to "DrawDownResult" has incompatible type "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "float" [arg-type]
+ freqtrade/data/metrics.py:263: error: Argument "relative_account_drawdown" to "DrawDownResult" has incompatible type "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "float" [arg-type]
- freqtrade/data/metrics.py:265: error: Argument "current_high_date" to "DrawDownResult" has incompatible type "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "Timestamp" [arg-type]
+ freqtrade/data/metrics.py:265: error: Argument "current_high_date" to "DrawDownResult" has incompatible type "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "Timestamp" [arg-type]
- freqtrade/data/converter/orderflow.py:116: error: Incompatible types in assignment (expression has type "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]", variable has type "datetime") [assignment]
+ freqtrade/data/converter/orderflow.py:116: error: Incompatible types in assignment (expression has type "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]", variable has type "datetime[Any]") [assignment]
- freqtrade/data/converter/orderflow.py:134: error: Incompatible types in assignment (expression has type "list[dict[Hashable, Any]]", target has type "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | NAType | NaTType | None") [assignment]
+ freqtrade/data/converter/orderflow.py:134: error: Incompatible types in assignment (expression has type "list[dict[Hashable, Any]]", target has type "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | NAType | NaTType | None") [assignment]
- freqtrade/data/converter/orderflow.py:142: error: Incompatible types in assignment (expression has type "dict[Hashable, dict[Hashable, Any]]", target has type "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | NAType | NaTType | None") [assignment]
+ freqtrade/data/converter/orderflow.py:142: error: Incompatible types in assignment (expression has type "dict[Hashable, dict[Hashable, Any]]", target has type "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | NAType | NaTType | None") [assignment]
- freqtrade/data/converter/orderflow.py:175: note: def __rsub__(self, datetime | Timestamp | datetime64[date | int | None], /) -> Timestamp
+ freqtrade/data/converter/orderflow.py:175: note: def __rsub__(self, datetime[Any] | Timestamp | datetime64[date | int | None], /) -> Timestamp
- freqtrade/data/converter/orderflow.py:175: note: def __sub__(self, datetime, /) -> Never
+ freqtrade/data/converter/orderflow.py:175: note: def __sub__(self, datetime[Any], /) -> Never
+ freqtrade/data/converter/orderflow.py:175: note: def __sub__(self, datetime[tzinfo] | datetime[tzinfo | None], /) -> timedelta
- freqtrade/data/converter/orderflow.py:175: note: def __sub__(self, datetime, /) -> timedelta
+ freqtrade/data/converter/orderflow.py:175: note: def __sub__(self, datetime[None] | datetime[tzinfo | None], /) -> timedelta
- freqtrade/data/converter/orderflow.py:175: note: def __sub__(self, timedelta, /) -> datetime
+ freqtrade/data/converter/orderflow.py:175: note: def __sub__(self, timedelta, /) -> datetime[Any]
- freqtrade/data/converter/orderflow.py:175: error: Unsupported operand types for - ("timedelta" and "datetime") [operator]
+ freqtrade/data/converter/orderflow.py:175: error: Unsupported operand types for - ("timedelta" and "datetime[Any]") [operator]
- freqtrade/data/converter/orderflow.py:175: error: No overload variant of "__sub__" of "timedelta64" matches argument type "datetime" [operator]
+ freqtrade/data/converter/orderflow.py:175: error: No overload variant of "__sub__" of "timedelta64" matches argument type "datetime[Any]" [operator]
- freqtrade/data/converter/orderflow.py:175: error: Unsupported operand types for - ("bool" and "datetime") [operator]
+ freqtrade/data/converter/orderflow.py:175: error: Unsupported operand types for - ("bool" and "datetime[Any]") [operator]
- freqtrade/data/converter/orderflow.py:175: error: Unsupported operand types for - ("int" and "datetime") [operator]
+ freqtrade/data/converter/orderflow.py:175: error: Unsupported operand types for - ("int" and "datetime[Any]") [operator]
- freqtrade/data/converter/orderflow.py:175: error: Unsupported operand types for - ("float" and "datetime") [operator]
+ freqtrade/data/converter/orderflow.py:175: error: Unsupported operand types for - ("float" and "datetime[Any]") [operator]
- freqtrade/data/converter/orderflow.py:175: note: def __sub__(self, datetime | datetime64[date | int | None], /) -> Timedelta
+ freqtrade/data/converter/orderflow.py:175: note: def __sub__(self, datetime[Any] | datetime64[date | int | None], /) -> Timedelta
- freqtrade/data/converter/orderflow.py:175: error: No overload variant of "__sub__" of "Timedelta" matches argument type "datetime" [operator]
+ freqtrade/data/converter/orderflow.py:175: error: No overload variant of "__sub__" of "Timedelta" matches argument type "datetime[Any]" [operator]
- freqtrade/data/converter/orderflow.py:175: error: Unsupported operand types for - ("complex" and "datetime") [operator]
+ freqtrade/data/converter/orderflow.py:175: error: Unsupported operand types for - ("complex" and "datetime[Any]") [operator]
- freqtrade/data/converter/orderflow.py:175: error: Unsupported operand types for - ("integer[Any]" and "datetime") [operator]
+ freqtrade/data/converter/orderflow.py:175: error: Unsupported operand types for - ("integer[Any]" and "datetime[Any]") [operator]
- freqtrade/data/converter/orderflow.py:175: error: No overload variant of "__sub__" of "floating" matches argument type "datetime" [operator]
+ freqtrade/data/converter/orderflow.py:175: error: No overload variant of "__sub__" of "floating" matches argument type "datetime[Any]" [operator]
- freqtrade/data/converter/orderflow.py:175: error: No overload variant of "__sub__" of "complexfloating" matches argument type "datetime" [operator]
+ freqtrade/data/converter/orderflow.py:175: error: No overload variant of "__sub__" of "complexfloating" matches argument type "datetime[Any]" [operator]
- freqtrade/data/converter/converter.py:109: error: Argument 1 has incompatible type "dict[str, str]"; expected "Callable[[DataFrame], str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | Callable[[DataFrame], Series[Any]] | Callable[[DataFrame], DataFrame] | ufunc | str | list[Callable[[DataFrame], str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | Callable[[DataFrame], Series[Any]] | Callable[[DataFrame], DataFrame] | ufunc | str] | Mapping[Hashable, Callable[[DataFrame], str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | Callable[[DataFrame], Series[Any]] | Callable[[DataFrame], DataFrame] | ufunc | str | list[Callable[[DataFrame], str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | Callable[[DataFrame], Series[Any]] | Callable[[DataFrame], DataFrame] | ufunc | str]] | None" [arg-type]
+ freqtrade/data/converter/converter.py:109: error: Argument 1 has incompatible type "dict[str, str]"; expected "Callable[[DataFrame], str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | Callable[[DataFrame], Series[Any]] | Callable[[DataFrame], DataFrame] | ufunc | str | list[Callable[[DataFrame], str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | Callable[[DataFrame], Series[Any]] | Callable[[DataFrame], DataFrame] | ufunc | str] | Mapping[Hashable, Callable[[DataFrame], str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | Callable[[DataFrame], Series[Any]] | Callable[[DataFrame], DataFrame] | ufunc | str | list[Callable[[DataFrame], str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | Callable[[DataFrame], Series[Any]] | Callable[[DataFrame], DataFrame] | ufunc | str]] | None" [arg-type]
- freqtrade/data/converter/converter.py:294: note: def [ScalarT: str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] __setitem__(self, Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | str_ | tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...] | list[ScalarT], Any | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | IndexOpsMixin[Any, Any] | None, /) -> None
+ freqtrade/data/converter/converter.py:294: note: def [ScalarT: str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] __setitem__(self, Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | str_ | tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...] | list[ScalarT], Any | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | IndexOpsMixin[Any, Any] | None, /) -> None
- freqtrade/data/converter/converter.py:296: note: def [ScalarT: str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] __setitem__(self, Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | str_ | tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...] | list[ScalarT], Any | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | IndexOpsMixin[Any, Any] | None, /) -> None
+ freqtrade/data/converter/converter.py:296: note: def [ScalarT: str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] __setitem__(self, Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | str_ | tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...] | list[ScalarT], Any | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | IndexOpsMixin[Any, Any] | None, /) -> None
- freqtrade/data/btanalysis/trade_parallelism.py:40: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime | timedelta, HashableT1: Hashable, HashableT2: Hashable, HashableT3: Hashable, HashableT4: Hashable] concat(objs: Iterable[Series[S2] | None] | Mapping[HashableT1, Series[S2] | None], *, axis: Literal['index', 0] = ..., join: Literal['inner', 'outer'] = ..., ignore_index: bool = ..., keys: Iterable[HashableT2] | None = ..., levels: Sequence[list[HashableT3] | tuple[HashableT3, ...]] | None = ..., names: list[HashableT4] | None = ..., verify_integrity: bool = ..., sort: bool = ..., copy: bool = ...) -> Series[S2]
+ freqtrade/data/btanalysis/trade_parallelism.py:40: note: def [S2: str | bytes | bool | int | float | complex | <6 more items> | type[str] | list[str] | date | time | datetime[Any] | timedelta, HashableT1: Hashable, HashableT2: Hashable, HashableT3: Hashable, HashableT4: Hashable] concat(objs: Iterable[Series[S2] | None] | Mapping[HashableT1, Series[S2] | None], *, axis: Literal['index', 0] = ..., join: Literal['inner', 'outer'] = ..., ignore_index: bool = ..., keys: Iterable[HashableT2] | None = ..., levels: Sequence[list[HashableT3] | tuple[HashableT3, ...]] | None = ..., names: list[HashableT4] | None = ..., verify_integrity: bool = ..., sort: bool = ..., copy: bool = ...) -> Series[S2]
- freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "str" of "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
+ freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "str" of "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
- freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "bytes" of "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
+ freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "bytes" of "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
- freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "date" of "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
+ freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "date" of "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
- freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "datetime" of "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
+ freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "datetime[Any]" of "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
- freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "timedelta" of "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
+ freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "timedelta" of "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
- freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "bool" of "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
+ freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "bool" of "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
- freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "int" of "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
+ freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "int" of "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
- freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "float" of "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
+ freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "float" of "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
- freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "Timestamp" of "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
+ freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "Timestamp" of "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
- freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "Timedelta" of "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
+ freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "Timedelta" of "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
- freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "complex" of "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
+ freqtrade/optimize/optimize_reports/optimize_reports.py:64: error: Item "complex" of "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]" has no attribute "copy" [union-attr]
- freqtrade/optimize/optimize_reports/optimize_reports.py:341: error: Argument 1 to "int" has incompatible type "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc" [arg-type]
+ freqtrade/optimize/optimize_reports/optimize_reports.py:341: error: Argument 1 to "int" has incompatible type "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc" [arg-type]
- freqtrade/optimize/optimize_reports/optimize_reports.py:342: error: Argument 1 to "int" has incompatible type "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc" [arg-type]
+ freqtrade/optimize/optimize_reports/optimize_reports.py:342: error: Argument 1 to "int" has incompatible type "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]"; expected "str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc" [arg-type]
- freqtrade/strategy/strategy_helper.py:107: note: def __sub__(self, datetime, /) -> Never
+ freqtrade/strategy/strategy_helper.py:107: note: def __sub__(self, datetime[Any], /) -> Never
- freqtrade/strategy/strategy_helper.py:108: note: def __sub__(self, datetime, /) -> Never
+ freqtrade/strategy/strategy_helper.py:108: note: def __sub__(self, datetime[Any], /) -> Never
- freqtrade/data/entryexitanalysis.py:58: error: Invalid index type "tuple[Hashable, str]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[int | str | str_ | Timestamp | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...] | Callable[[DataFrame], Never], int | str | str_ | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...]]" [index]
+ freqtrade/data/entryexitanalysis.py:58: error: Invalid index type "tuple[Hashable, str]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[int | str | str_ | Timestamp | tuple[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...] | Callable[[DataFrame], Never], int | str | str_ | tuple[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...]]" [index]
- freqtrade/freqai/data_kitchen.py:444: error: Incompatible types in assignment (expression has type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]", target has type "str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | NAType | NaTType | None | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | NAType | NaTType | None] | Sequence[Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | NAType | NaTType | None]] | Mapping[Any, str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | NAType | NaTType | None] | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | IndexOpsMixin[Any, Any] | DataFrame") [assignment]
+ freqtrade/freqai/data_kitchen.py:444: error: Incompatible types in assignment (expression has type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]", target has type "str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | NAType | NaTType | None | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | NAType | NaTType | None] | Sequence[Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | NAType | NaTType | None]] | Mapping[Any, str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | NAType | NaTType | None] | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | IndexOpsMixin[Any, Any] | DataFrame") [assignment]
- freqtrade/plot/plotting.py:187: error: Invalid index type "tuple[datetime, str]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[int | str | str_ | Timestamp | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...] | Callable[[DataFrame], Never], int | str | str_ | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...]]" [index]
+ freqtrade/plot/plotting.py:187: error: Invalid index type "tuple[datetime[Any], str]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[int | str | str_ | Timestamp | tuple[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...] | Callable[[DataFrame], Never], int | str | str_ | tuple[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...]]" [index]
- freqtrade/plot/plotting.py:188: error: Invalid index type "tuple[datetime, str]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[int | str | str_ | Timestamp | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...] | Callable[[DataFrame], Never], int | str | str_ | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...]]" [index]
+ freqtrade/plot/plotting.py:188: error: Invalid index type "tuple[datetime[Any], str]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[int | str | str_ | Timestamp | tuple[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...] | Callable[[DataFrame], Never], int | str | str_ | tuple[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...]]" [index]
- freqtrade/templates/FreqaiExampleStrategy.py:245: error: Invalid index type "tuple[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...], list[str]]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...], Hashable]" [index]
+ freqtrade/templates/FreqaiExampleStrategy.py:245: error: Invalid index type "tuple[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...], list[str]]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...], Hashable]" [index]
- freqtrade/templates/FreqaiExampleStrategy.py:245: error: Unsupported left operand type for & ("tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]") [operator]
+ freqtrade/templates/FreqaiExampleStrategy.py:245: error: Unsupported left operand type for & ("tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]") [operator]
- freqtrade/templates/FreqaiExampleStrategy.py:245: error: Argument 2 to "reduce" has incompatible type "list[Series[builtins.bool]]"; expected "Iterable[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]]" [arg-type]
+ freqtrade/templates/FreqaiExampleStrategy.py:245: error: Argument 2 to "reduce" has incompatible type "list[Series[builtins.bool]]"; expected "Iterable[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]]" [arg-type]
- freqtrade/templates/FreqaiExampleStrategy.py:255: error: Invalid index type "tuple[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...], list[str]]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...], Hashable]" [index]
+ freqtrade/templates/FreqaiExampleStrategy.py:255: error: Invalid index type "tuple[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...], list[str]]" for "_LocIndexerFrame[DataFrame]"; expected type "tuple[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...], Hashable]" [index]
- freqtrade/templates/FreqaiExampleStrategy.py:255: error: Unsupported left operand type for & ("tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]") [operator]
+ freqtrade/templates/FreqaiExampleStrategy.py:255: error: Unsupported left operand type for & ("tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]") [operator]
- freqtrade/templates/FreqaiExampleStrategy.py:255: error: Argument 2 to "reduce" has incompatible type "list[Series[builtins.bool]]"; expected "Iterable[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]]" [arg-type]
+ freqtrade/templates/FreqaiExampleStrategy.py:255: error: Argument 2 to "reduce" has incompatible type "list[Series[builtins.bool]]"; expected "Iterable[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]]" [arg-type]
- freqtrade/templates/FreqaiExampleStrategy.py:263: error: Unsupported left operand type for & ("tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]") [operator]
+ freqtrade/templates/FreqaiExampleStrategy.py:263: error: Unsupported left operand type for & ("tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]") [operator]
- freqtrade/templates/FreqaiExampleStrategy.py:263: error: Argument 2 to "reduce" has incompatible type "list[Series[builtins.bool]]"; expected "Iterable[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]]" [arg-type]
+ freqtrade/templates/FreqaiExampleStrategy.py:263: error: Argument 2 to "reduce" has incompatible type "list[Series[builtins.bool]]"; expected "Iterable[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]]" [arg-type]
- freqtrade/templates/FreqaiExampleStrategy.py:267: error: Unsupported left operand type for & ("tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]") [operator]
+ freqtrade/templates/FreqaiExampleStrategy.py:267: error: Unsupported left operand type for & ("tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]") [operator]
- freqtrade/templates/FreqaiExampleStrategy.py:267: error: Argument 2 to "reduce" has incompatible type "list[Series[builtins.bool]]"; expected "Iterable[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]]" [arg-type]
+ freqtrade/templates/FreqaiExampleStrategy.py:267: error: Argument 2 to "reduce" has incompatible type "list[Series[builtins.bool]]"; expected "Iterable[tuple[IndexOpsMixin[Any, Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | Sequence[str | bytes | date | datetime[Any] | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any]] | slice[Any, Any, Any], ...]]" [arg-type]
tornado (https://github.com/tornadoweb/tornado)
+ tornado/test/locale_test.py:100: error: Unsupported operand types for - ("object" and "timedelta") [operator]
+ tornado/test/locale_test.py:100: error: Argument 1 to "format_date" of "Locale" has incompatible type "timedelta"; expected "int | float | datetime[Any]" [arg-type]
+ tornado/test/locale_test.py:106: error: Unsupported operand types for - ("object" and "timedelta") [operator]
+ tornado/test/locale_test.py:106: error: Argument 1 to "format_date" of "Locale" has incompatible type "timedelta"; expected "int | float | datetime[Any]" [arg-type]
+ tornado/test/locale_test.py:112: error: Unsupported operand types for - ("object" and "timedelta") [operator]
+ tornado/test/locale_test.py:112: error: Argument 1 to "format_date" of "Locale" has incompatible type "timedelta"; expected "int | float | datetime[Any]" [arg-type]
+ tornado/test/locale_test.py:119: error: Unsupported operand types for - ("object" and "timedelta") [operator]
+ tornado/test/locale_test.py:119: error: Argument 1 to "format_date" of "Locale" has incompatible type "timedelta"; expected "int | float | datetime[Any]" [arg-type]
+ tornado/test/locale_test.py:126: error: Unsupported operand types for - ("object" and "timedelta") [operator]
+ tornado/test/locale_test.py:126: error: Incompatible types in assignment (expression has type "timedelta", variable has type "datetime[None]") [assignment]
+ tornado/test/locale_test.py:132: error: Unsupported operand types for - ("object" and "timedelta") [oper
... (truncated 346 lines) ... |
No description provided.