ashb commented on a change in pull request #4926: [AIRFLOW-4104] Add type 
annotations to common classes.
URL: https://github.com/apache/airflow/pull/4926#discussion_r267268730
 
 

 ##########
 File path: airflow/models/__init__.py
 ##########
 @@ -4290,7 +4291,13 @@ def setdefault(cls, key, default, 
deserialize_json=False):
 
     @classmethod
     @provide_session
-    def get(cls, key, default_var=__NO_DEFAULT_SENTINEL, 
deserialize_json=False, session=None):
+    def get(
+        cls,
+        key,  # type: str
+        default_var=__NO_DEFAULT_SENTINEL,  # type: Any
+        deserialize_json=False,  # type: bool
+        session=None
 
 Review comment:
   For something as monstorous as the BaseOperator it makes sense to have the 
comment on the arg, not at the end.
   
   I was just thinking that in this case where there's about "4 or 5" args that 
it might be clear and shorter to have one type comment at the end. But I'm not 
sure that is true.
   
   Anyone have any opinions either way?

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


With regards,
Apache Git Services

Reply via email to