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

Use airflow.exceptions.AirflowException in core #34510

Merged
merged 1 commit into from
Sep 21, 2023
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
2 changes: 1 addition & 1 deletion airflow/auth/managers/fab/fab_auth_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import warnings
from typing import TYPE_CHECKING

from airflow import AirflowException
from airflow.auth.managers.base_auth_manager import BaseAuthManager
from airflow.auth.managers.fab.cli_commands.definition import (
ROLES_COMMANDS,
Expand All @@ -30,6 +29,7 @@
from airflow.cli.cli_config import (
GroupCommand,
)
from airflow.exceptions import AirflowException

if TYPE_CHECKING:
from airflow.auth.managers.fab.models import User
Expand Down
2 changes: 1 addition & 1 deletion airflow/auth/managers/fab/security_manager/override.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
from sqlalchemy.exc import MultipleResultsFound
from werkzeug.security import generate_password_hash

from airflow import AirflowException
from airflow.auth.managers.fab.models import Action, Permission, RegisterUser, Resource, Role
from airflow.auth.managers.fab.models.anonymous_user import AnonymousUser
from airflow.exceptions import AirflowException
from airflow.www.security_manager import AirflowSecurityManagerV2
from airflow.www.session import AirflowDatabaseSessionInterface

Expand Down
2 changes: 1 addition & 1 deletion airflow/decorators/setup_teardown.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import types
from typing import TYPE_CHECKING, Callable

from airflow import AirflowException
from airflow.decorators import python_task
from airflow.decorators.task_group import _TaskGroupFactory
from airflow.exceptions import AirflowException
from airflow.models import BaseOperator
from airflow.utils.setup_teardown import SetupTeardownContext

Expand Down
2 changes: 1 addition & 1 deletion airflow/utils/db_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
from sqlalchemy.orm import aliased
from sqlalchemy.sql.expression import ClauseElement, Executable, tuple_

from airflow import AirflowException
from airflow.cli.simple_table import AirflowConsole
from airflow.configuration import conf
from airflow.exceptions import AirflowException
from airflow.utils import timezone
from airflow.utils.db import reflect_tables
from airflow.utils.helpers import ask_yesno
Expand Down
2 changes: 1 addition & 1 deletion airflow/utils/dot_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import graphviz

from airflow import AirflowException
from airflow.exceptions import AirflowException
from airflow.models.baseoperator import BaseOperator
from airflow.models.mappedoperator import MappedOperator
from airflow.utils.dag_edges import dag_edges
Expand Down
2 changes: 1 addition & 1 deletion tests/always/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import sqlalchemy
from cryptography.fernet import Fernet

from airflow import AirflowException
from airflow.exceptions import AirflowException
from airflow.hooks.base import BaseHook
from airflow.models import Connection, crypto
from airflow.providers.sqlite.hooks.sqlite import SqliteHook
Expand Down
2 changes: 1 addition & 1 deletion tests/auth/managers/fab/test_fab_auth_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

import pytest

from airflow import AirflowException
from airflow.auth.managers.fab.fab_auth_manager import FabAuthManager
from airflow.auth.managers.fab.models import User
from airflow.auth.managers.fab.security_manager.override import FabAirflowSecurityManagerOverride
from airflow.exceptions import AirflowException
from airflow.www.security_appless import ApplessAirflowSecurityManager


Expand Down
2 changes: 1 addition & 1 deletion tests/listeners/test_listeners.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import pytest

from airflow import AirflowException
from airflow.exceptions import AirflowException
from airflow.jobs.job import Job, run_job
from airflow.listeners.listener import get_listener_manager
from airflow.operators.bash import BashOperator
Expand Down
2 changes: 1 addition & 1 deletion tests/models/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import pytest

from airflow import AirflowException
from airflow.exceptions import AirflowException
from airflow.models import Connection


Expand Down
3 changes: 2 additions & 1 deletion tests/models/test_dagcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

import pytest

from airflow import AirflowException, example_dags as example_dags_module
import airflow.example_dags as example_dags_module
from airflow.exceptions import AirflowException
from airflow.models import DagBag
from airflow.models.dagcode import DagCode

Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_db_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from sqlalchemy.exc import OperationalError
from sqlalchemy.ext.declarative import DeclarativeMeta

from airflow import AirflowException
from airflow.exceptions import AirflowException
from airflow.models import DagModel, DagRun, TaskInstance
from airflow.operators.python import PythonOperator
from airflow.utils.db_cleanup import (
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import pytest

from airflow import AirflowException
from airflow.exceptions import AirflowException
from airflow.jobs.base_job_runner import BaseJobRunner
from airflow.utils import helpers, timezone
from airflow.utils.helpers import (
Expand Down