Dennis O'Brien
12/12/2023, 9:51 PMpyright
or mypy
.
We recently updated to flytekit==1.10.2
(from 1.7.0
). I first removed the decorators @dataclass_json
based on PR-1801, and that does eliminate many of the false positive reported by the static type checking tools.
But I'm still seeing a lot of errors like this:
error: Expression of type "Tuple[Promise] | Promise | VoidPromise | Tuple[Unknown, ...] | None" cannot be assigned to declared type "TrainDatasetParameters"
error: "VoidPromise" is not iterable
error: Expression with type "Tuple[Promise] | Promise | VoidPromise | Tuple[Unknown, ...] | None" cannot be assigned to target tuple
error: Operator ">>" not supported for types "Tuple[Promise] | Promise | VoidPromise | Tuple[Unknown, ...] | None" and "DataFrame"
I am also getting a few new type check errors like this:
Argument of type "PythonFunctionWorkflow | ((...) -> bool)" cannot be assigned to parameter "workflow" of type "WorkflowBase" in function "get_or_create"
But I think these might be real.Dennis O'Brien
12/12/2023, 9:57 PMerror: Expression of type "Tuple[Promise] | Promise | VoidPromise | Tuple[Unknown, ...] | None" cannot be assigned to declared type "TrainDatasetParameters"
https://github.com/flyteorg/flyte/issues/3682Dennis O'Brien
12/12/2023, 9:58 PMDennis O'Brien
12/12/2023, 10:03 PMpydantic
data classes.
https://github.com/flyteorg/flyte/issues/1823Dennis O'Brien
12/12/2023, 10:04 PMSamhita Alla
Dennis O'Brien
12/16/2023, 1:05 AM