potiuk commented on code in PR #40208:
URL: https://github.com/apache/airflow/pull/40208#discussion_r1637582732


##########
airflow/utils/python_virtualenv_script.jinja2:
##########
@@ -16,7 +16,9 @@
  specific language governing permissions and limitations
  under the License.
 -#}
-
+{% if import_annotations | default(False) %}
+from __future__ import annotations

Review Comment:
   Can't we just add `from __future__ import annotations` always ? I don't 
think it has any serious side-effects, it should be fully backwards compatible 
and it would remove the need of checking for annotations import in callable 
(which also is not a good one because I think it does not handle the case where 
`from __future__ import annotation` is at the top-level of the DAG (which will 
be actually most of the cases when someone uses is).



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

Reply via email to