Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix import future annotations in venv jinja template #40208

Merged
merged 12 commits into from
Jun 14, 2024
Prev Previous commit
Next Next commit
fix: revert test
  • Loading branch information
phi-friday committed Jun 14, 2024
commit e3ac8a555d7c7a6a6f96fea97b200c7b91a171e5
20 changes: 0 additions & 20 deletions tests/providers/docker/decorators/_with_annotations.py

This file was deleted.

22 changes: 0 additions & 22 deletions tests/providers/docker/decorators/test_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,25 +284,3 @@ def f():
ret = f()

assert ret.operator.docker_url == "unix://var/run/docker.sock"

def test_import_annotations(self, dag_maker):
from typing import Any

from airflow.models.dagrun import DagRun # noqa: TCH001
from airflow.utils.state import DagRunState

from ._with_annotations import create_task_factory # noqa: TID252

task_factory = create_task_factory("python:3.9-slim")

with dag_maker():

@task.python(multiple_outputs=False)
def create_dummy_value() -> dict[str, Any]:
return {}

value = create_dummy_value()
_ = task_factory(value)

dagrun: DagRun = dag_maker.create_dagrun()
assert DagRunState(dagrun.state) == DagRunState.SUCCESS