xinbinhuang commented on a change in pull request #8635:
URL: https://github.com/apache/airflow/pull/8635#discussion_r417787234



##########
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:
       This one is a bit tricky. `self.name` is actually returning the `NAME` 
field that is defined in most of the `TIDep` class with fallback to 
`self.__class__.__name__`. 
   
   
https://github.com/apache/airflow/blob/d8482c32695e173c026d22633d48ec93f69e58e8/airflow/ti_deps/deps/base_ti_dep.py#L52-L58
   
   For example:
   
https://github.com/apache/airflow/blob/d8482c32695e173c026d22633d48ec93f69e58e8/airflow/ti_deps/deps/dag_ti_slots_available_dep.py#L23-L28
   
   I was actually thinking to remove that `NAME` field because it seems 
redundant. That being said, I haven't taken a deeper look into how is that 
`NAME` field being used by other modules. So It will be great if you or anyone 
can provide some background information on that. Or I will double check that 
tomorrow.
   




----------------------------------------------------------------
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]


Reply via email to