uranusjr commented on code in PR #25242: URL: https://github.com/apache/airflow/pull/25242#discussion_r932004699
########## airflow/example_dags/example_branch_operator_decorator.py: ########## @@ -16,10 +16,12 @@ # specific language governing permissions and limitations # under the License. -"""Example DAG demonstrating the usage of the BranchPythonOperator.""" +"""Example DAG demonstrating the usage of the ``@task.branch`` TaskFlow API decorator.""" import random -from datetime import datetime +from typing import List Review Comment: The `list[str]` syntax works out of the box on 3.9+ so the `from __future__ import annotation` line is not needed on those platforms. For 3.8 users, if they do blind copy-and-paste on partial code they get NameError due to `List` not being defined anyway, and if they know enough to copy the typing import, they probably can also notice the lack of `__future__` import. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
