potiuk commented on code in PR #25780:
URL: https://github.com/apache/airflow/pull/25780#discussion_r948977015
##########
airflow/operators/python.py:
##########
@@ -176,7 +178,7 @@ def execute(self, context: Context) -> Any:
return return_value
- def determine_kwargs(self, context: Mapping[str, Any]) -> Mapping[str,
Any]:
+ def determine_kwargs(self, context: MutableMapping[str, Any]) ->
MutableMapping[str, Any]:
Review Comment:
Actualy it's both - @uranusjr. I just have a case where `--all-files`
produces different result (success) than just changes from this commit, so
likely the hypothesis of having to add .pyi is right. Will experiment a bit.
This are the errors I get when I only run mypy on the changed files in this
commit:
```
airflow/operators/python.py:277: error: Argument 3 to "skip" of "SkipMixin"
has
incompatible type "Collection[Union[BaseOperator, MappedOperator]]"; expected
"Sequence[BaseOperator]" [arg-type]
self.skip(dag_run, execution_date, downstream_tasks)
^
airflow/operators/python.py:282: error: Argument 3 to "skip" of "SkipMixin"
has
incompatible type "Iterable[DAGNode]"; expected "Sequence[BaseOperator]"
[arg-type]
... self.skip(dag_run, execution_date,
context["task"].get_d...
^
Found 2 errors in 1 file (checked 1 source file)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]