potiuk commented on a change in pull request #10498:
URL: https://github.com/apache/airflow/pull/10498#discussion_r475293930
##########
File path: airflow/www/views.py
##########
@@ -827,23 +873,25 @@ def task(self):
return redirect(url_for('Airflow.index'))
task = copy.copy(dag.get_task(task_id))
task.resolve_template_files()
- ti = TI(task=task, execution_date=dttm)
+ ti = TaskInstance(task=task, execution_date=dttm)
ti.refresh_from_db()
ti_attrs = []
for attr_name in dir(ti):
if not attr_name.startswith('_'):
attr = getattr(ti, attr_name)
- if type(attr) != type(self.task): # noqa
+ if type(attr) != type(self.task): # noqa pylint:
disable=unidiomatic-typecheck
Review comment:
I prefer to keep it as it is. There is a subtle difference between the
two statemenets. The original one is true if the two types are the same, the
second is true when the attr derives from the "self.task" type (but it can be a
subclass). I prefer to stay with the original behaviour even if I have to add
the exception.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]