BasPH commented on a change in pull request #8635:
URL: https://github.com/apache/airflow/pull/8635#discussion_r417765101
##########
File path: airflow/models/baseoperator.py
##########
@@ -1044,8 +1044,7 @@ def get_direct_relatives(self, upstream: bool = False) ->
List[str]:
return self.downstream_list
def __repr__(self):
- return "<Task({self.__class__.__name__}): {self.task_id}>".format(
- self=self)
+ return f"<Task({self.__class__.__name__}): {self.task_id}>"
Review comment:
I know this isn't your change, but there's no `Task` class in Airflow,
so IMO it doesn't make sense to print "Task" here. Can we change to:
```suggestion
return f"<{self.__class__.__name__}: {self.task_id}>"
```
##########
File path: airflow/ti_deps/deps/base_ti_dep.py
##########
@@ -47,7 +47,7 @@ def __hash__(self):
return hash(type(self))
def __repr__(self):
- return "<TIDep({self.name})>".format(self=self)
+ return f"<TIDep({self.name})>"
Review comment:
For consistency, let's use `self.__class__.__name__` here too
----------------------------------------------------------------
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]