Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions airflow-core/src/airflow/models/dag_favorite.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@
# under the License.
from __future__ import annotations

from typing import TYPE_CHECKING

from sqlalchemy import ForeignKey
from sqlalchemy.orm import Mapped # noqa: TC002

from airflow.models.base import Base, StringID
from airflow.utils.sqlalchemy import mapped_column

if TYPE_CHECKING:
from sqlalchemy.orm import Mapped


class DagFavorite(Base):
"""Association table model linking users to their favorite DAGs."""
Expand Down
3 changes: 1 addition & 2 deletions airflow-core/src/airflow/models/db_callback_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
from typing import TYPE_CHECKING

from sqlalchemy import Integer, String
from sqlalchemy.orm import Mapped # noqa: TC002

from airflow._shared.timezones import timezone
from airflow.models.base import Base
from airflow.utils.sqlalchemy import ExtendedJSON, UtcDateTime, mapped_column

if TYPE_CHECKING:
from sqlalchemy.orm import Mapped

from airflow.callbacks.callback_requests import CallbackRequest


Expand Down
6 changes: 1 addition & 5 deletions airflow-core/src/airflow/models/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,13 @@
# under the License.
from __future__ import annotations

from typing import TYPE_CHECKING

from sqlalchemy import Integer, String, Text
from sqlalchemy.orm import Mapped # noqa: TC002

from airflow.dag_processing.bundles.manager import DagBundlesManager
from airflow.models.base import Base, StringID
from airflow.utils.sqlalchemy import UtcDateTime, mapped_column

if TYPE_CHECKING:
from sqlalchemy.orm import Mapped


class ParseImportError(Base):
"""Stores all Import Errors which are recorded when parsing DAGs and displayed on the Webserver."""
Expand Down
2 changes: 1 addition & 1 deletion airflow-core/src/airflow/models/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from typing import TYPE_CHECKING, Any, TypedDict

from sqlalchemy import Boolean, ForeignKey, Integer, String, Text, func, select
from sqlalchemy.orm import Mapped # noqa: TC002
from sqlalchemy_utils import UUIDType

from airflow.exceptions import AirflowException, PoolNotFound
Expand All @@ -32,7 +33,6 @@
from airflow.utils.state import TaskInstanceState

if TYPE_CHECKING:
from sqlalchemy.orm import Mapped
from sqlalchemy.orm.session import Session


Expand Down
6 changes: 1 addition & 5 deletions airflow-core/src/airflow/models/tasklog.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,13 @@
# under the License.
from __future__ import annotations

from typing import TYPE_CHECKING

from sqlalchemy import Integer, Text
from sqlalchemy.orm import Mapped # noqa: TC002

from airflow._shared.timezones import timezone
from airflow.models.base import Base
from airflow.utils.sqlalchemy import UtcDateTime, mapped_column

if TYPE_CHECKING:
from sqlalchemy.orm import Mapped


class LogTemplate(Base):
"""
Expand Down
3 changes: 2 additions & 1 deletion airflow-core/src/airflow/models/taskmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from typing import TYPE_CHECKING, Any

from sqlalchemy import CheckConstraint, ForeignKeyConstraint, Integer, String, func, or_, select
from sqlalchemy.orm import Mapped # noqa: TC002

from airflow.models.base import COLLATION_ARGS, ID_LEN, TaskInstanceDependencies
from airflow.models.dag_version import DagVersion
Expand All @@ -33,7 +34,7 @@
from airflow.utils.state import State, TaskInstanceState

if TYPE_CHECKING:
from sqlalchemy.orm import Mapped, Session
from sqlalchemy.orm import Session

from airflow.models.mappedoperator import MappedOperator
from airflow.models.taskinstance import TaskInstance
Expand Down
Loading