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_r267139037
##########
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:
General style point:
On these "shorter" fns is it possible to put the type annotation at the end
instead of inline? Or is this the more commonly accepted style for type
comments on func args?
----------------------------------------------------------------
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