josh-fell commented on a change in pull request #20034:
URL: https://github.com/apache/airflow/pull/20034#discussion_r770961065
##########
File path: airflow/operators/python.py
##########
@@ -131,14 +131,14 @@ def my_python_callable(**kwargs):
:type show_return_value_in_logs: bool
"""
- template_fields = ('templates_dict', 'op_args', 'op_kwargs')
+ template_fields: Sequence[str] = ('templates_dict', 'op_args', 'op_kwargs')
Review comment:
Unfortunately the typing doesn't inherit from `BaseOperator` here for
some reason. With the typing removed we start seeing this:
```
airflow/decorators/python_virtualenv.py:45: error: Incompatible types in
assignment (expression has type "Tuple[str, str]", base class "PythonOperator"
defined the type as "Tuple[str, str, str]")
template_fields = ('op_args', 'op_kwargs')
^
airflow/decorators/python.py:42: error: Incompatible types in assignment
(expression has type "Tuple[str, str]", base class "PythonOperator" defined the
type as "Tuple[str, str, str]")
template_fields = ('op_args', 'op_kwargs')
```
--
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]