[AIRFLOW-4837] Fix pylint errors regarding ungrouped imports (#5464)
This commit is contained in:
Родитель
487ad38d60
Коммит
0d38bf40e5
|
@ -480,7 +480,6 @@
|
||||||
./tests/contrib/hooks/test_gcs_hook.py
|
./tests/contrib/hooks/test_gcs_hook.py
|
||||||
./tests/contrib/hooks/test_grpc_hook.py
|
./tests/contrib/hooks/test_grpc_hook.py
|
||||||
./tests/contrib/hooks/test_imap_hook.py
|
./tests/contrib/hooks/test_imap_hook.py
|
||||||
./tests/contrib/hooks/test_jdbc_hook.py
|
|
||||||
./tests/contrib/hooks/test_jira_hook.py
|
./tests/contrib/hooks/test_jira_hook.py
|
||||||
./tests/contrib/hooks/test_mongo_hook.py
|
./tests/contrib/hooks/test_mongo_hook.py
|
||||||
./tests/contrib/hooks/test_openfaas_hook.py
|
./tests/contrib/hooks/test_openfaas_hook.py
|
||||||
|
@ -563,14 +562,12 @@
|
||||||
./tests/contrib/sensors/test_aws_redshift_cluster_sensor.py
|
./tests/contrib/sensors/test_aws_redshift_cluster_sensor.py
|
||||||
./tests/contrib/sensors/test_bash_sensor.py
|
./tests/contrib/sensors/test_bash_sensor.py
|
||||||
./tests/contrib/sensors/test_celery_queue_sensor.py
|
./tests/contrib/sensors/test_celery_queue_sensor.py
|
||||||
./tests/contrib/sensors/test_emr_job_flow_sensor.py
|
|
||||||
./tests/contrib/sensors/test_emr_step_sensor.py
|
./tests/contrib/sensors/test_emr_step_sensor.py
|
||||||
./tests/contrib/sensors/test_file_sensor.py
|
./tests/contrib/sensors/test_file_sensor.py
|
||||||
./tests/contrib/sensors/test_ftp_sensor.py
|
./tests/contrib/sensors/test_ftp_sensor.py
|
||||||
./tests/contrib/sensors/test_gcp_transfer_sensor.py
|
./tests/contrib/sensors/test_gcp_transfer_sensor.py
|
||||||
./tests/contrib/sensors/test_jira_sensor_test.py
|
./tests/contrib/sensors/test_jira_sensor_test.py
|
||||||
./tests/contrib/sensors/test_python_sensor.py
|
./tests/contrib/sensors/test_python_sensor.py
|
||||||
./tests/contrib/sensors/test_qubole_sensor.py
|
|
||||||
./tests/contrib/sensors/test_redis_pub_sub_sensor.py
|
./tests/contrib/sensors/test_redis_pub_sub_sensor.py
|
||||||
./tests/contrib/sensors/test_sagemaker_endpoint_sensor.py
|
./tests/contrib/sensors/test_sagemaker_endpoint_sensor.py
|
||||||
./tests/contrib/sensors/test_sagemaker_training_sensor.py
|
./tests/contrib/sensors/test_sagemaker_training_sensor.py
|
||||||
|
@ -625,7 +622,6 @@
|
||||||
./tests/minikube/test_kubernetes_executor.py
|
./tests/minikube/test_kubernetes_executor.py
|
||||||
./tests/minikube/test_kubernetes_pod_operator.py
|
./tests/minikube/test_kubernetes_pod_operator.py
|
||||||
./tests/models/test_cleartasks.py
|
./tests/models/test_cleartasks.py
|
||||||
./tests/models/test_connection.py
|
|
||||||
./tests/models/test_dag.py
|
./tests/models/test_dag.py
|
||||||
./tests/models/test_dagbag.py
|
./tests/models/test_dagbag.py
|
||||||
./tests/models/test_dagrun.py
|
./tests/models/test_dagrun.py
|
||||||
|
@ -672,13 +668,8 @@
|
||||||
./tests/test_utils/reset_warning_registry.py
|
./tests/test_utils/reset_warning_registry.py
|
||||||
./tests/ti_deps/deps/fake_models.py
|
./tests/ti_deps/deps/fake_models.py
|
||||||
./tests/ti_deps/deps/test_dagrun_exists_dep.py
|
./tests/ti_deps/deps/test_dagrun_exists_dep.py
|
||||||
./tests/ti_deps/deps/test_not_in_retry_period_dep.py
|
|
||||||
./tests/ti_deps/deps/test_not_running_dep.py
|
|
||||||
./tests/ti_deps/deps/test_prev_dagrun_dep.py
|
|
||||||
./tests/ti_deps/deps/test_ready_to_reschedule_dep.py
|
./tests/ti_deps/deps/test_ready_to_reschedule_dep.py
|
||||||
./tests/ti_deps/deps/test_runnable_exec_date_dep.py
|
./tests/ti_deps/deps/test_runnable_exec_date_dep.py
|
||||||
./tests/ti_deps/deps/test_task_concurrency.py
|
|
||||||
./tests/ti_deps/deps/test_valid_state_dep.py
|
|
||||||
./tests/utils/log/elasticmock/fake_elasticsearch.py
|
./tests/utils/log/elasticmock/fake_elasticsearch.py
|
||||||
./tests/utils/log/elasticmock/__init__.py
|
./tests/utils/log/elasticmock/__init__.py
|
||||||
./tests/utils/log/test_es_task_handler.py
|
./tests/utils/log/test_es_task_handler.py
|
||||||
|
@ -695,7 +686,6 @@
|
||||||
./tests/utils/test_logging_mixin.py
|
./tests/utils/test_logging_mixin.py
|
||||||
./tests/utils/test_log_handlers.py
|
./tests/utils/test_log_handlers.py
|
||||||
./tests/utils/test_module_loading.py
|
./tests/utils/test_module_loading.py
|
||||||
./tests/utils/test_operator_helpers.py
|
|
||||||
./tests/utils/test_tests.py
|
./tests/utils/test_tests.py
|
||||||
./tests/utils/test_timezone.py
|
./tests/utils/test_timezone.py
|
||||||
./tests/www/api/experimental/test_endpoints.py
|
./tests/www/api/experimental/test_endpoints.py
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
from six import StringIO
|
from six import StringIO
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest.mock import patch, Mock, MagicMock
|
||||||
|
|
||||||
from datetime import datetime, timedelta, time
|
from datetime import datetime, timedelta, time
|
||||||
from unittest.mock import patch, Mock, MagicMock
|
|
||||||
from time import sleep
|
from time import sleep
|
||||||
import psutil
|
import psutil
|
||||||
import pytz
|
import pytz
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import unittest
|
import unittest
|
||||||
from collections import namedtuple
|
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
from collections import namedtuple
|
||||||
|
|
||||||
from airflow import configuration
|
from airflow import configuration
|
||||||
from airflow.models import Connection
|
from airflow.models import Connection
|
||||||
|
|
|
@ -19,10 +19,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from google.auth.exceptions import GoogleAuthError
|
from google.auth.exceptions import GoogleAuthError
|
||||||
from unittest import mock
|
|
||||||
from googleapiclient.errors import HttpError
|
from googleapiclient.errors import HttpError
|
||||||
|
|
||||||
from airflow.contrib.hooks import bigquery_hook as hook
|
from airflow.contrib.hooks import bigquery_hook as hook
|
||||||
|
|
|
@ -23,6 +23,8 @@ import unittest
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
|
|
||||||
from parameterized import parameterized
|
from parameterized import parameterized
|
||||||
|
import google.auth
|
||||||
|
from google.auth.exceptions import GoogleAuthError
|
||||||
from google.api_core.exceptions import RetryError, AlreadyExists
|
from google.api_core.exceptions import RetryError, AlreadyExists
|
||||||
from google.cloud.exceptions import MovedPermanently
|
from google.cloud.exceptions import MovedPermanently
|
||||||
|
|
||||||
|
@ -31,9 +33,6 @@ from googleapiclient.errors import HttpError
|
||||||
|
|
||||||
from airflow.contrib.hooks import gcp_api_base_hook as hook
|
from airflow.contrib.hooks import gcp_api_base_hook as hook
|
||||||
|
|
||||||
import google.auth
|
|
||||||
from google.auth.exceptions import GoogleAuthError
|
|
||||||
|
|
||||||
from airflow.hooks.base_hook import BaseHook
|
from airflow.hooks.base_hook import BaseHook
|
||||||
from tests.compat import mock
|
from tests.compat import mock
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,9 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest.mock import Mock, patch
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from unittest.mock import Mock
|
|
||||||
from unittest.mock import patch
|
|
||||||
|
|
||||||
from airflow import configuration
|
from airflow import configuration
|
||||||
from airflow.hooks.jdbc_hook import JdbcHook
|
from airflow.hooks.jdbc_hook import JdbcHook
|
||||||
from airflow.models import Connection
|
from airflow.models import Connection
|
||||||
|
|
|
@ -20,9 +20,8 @@
|
||||||
|
|
||||||
import six
|
import six
|
||||||
import unittest
|
import unittest
|
||||||
from itertools import dropwhile
|
|
||||||
|
|
||||||
from unittest.mock import patch, call
|
from unittest.mock import patch, call
|
||||||
|
from itertools import dropwhile
|
||||||
|
|
||||||
from airflow import configuration
|
from airflow import configuration
|
||||||
from airflow.models import Connection
|
from airflow.models import Connection
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
import datetime
|
import datetime
|
||||||
import re
|
import re
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest.mock import MagicMock, Mock, patch
|
||||||
|
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
@ -44,8 +46,6 @@ from tests.compat import mock
|
||||||
|
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
|
||||||
from unittest.mock import MagicMock, Mock
|
|
||||||
from unittest.mock import patch
|
|
||||||
|
|
||||||
TASK_ID = 'test-dataproc-operator'
|
TASK_ID = 'test-dataproc-operator'
|
||||||
CLUSTER_NAME = 'test-cluster-name'
|
CLUSTER_NAME = 'test-cluster-name'
|
||||||
|
|
|
@ -18,9 +18,8 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import timedelta
|
|
||||||
|
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
from airflow import DAG, configuration
|
from airflow import DAG, configuration
|
||||||
from airflow.contrib.operators.emr_add_steps_operator import EmrAddStepsOperator
|
from airflow.contrib.operators.emr_add_steps_operator import EmrAddStepsOperator
|
||||||
|
|
|
@ -19,9 +19,8 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import timedelta
|
|
||||||
|
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
from airflow import DAG, configuration
|
from airflow import DAG, configuration
|
||||||
from airflow.contrib.operators.emr_create_job_flow_operator import EmrCreateJobFlowOperator
|
from airflow.contrib.operators.emr_create_job_flow_operator import EmrCreateJobFlowOperator
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
# specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
import os
|
import os
|
||||||
|
from os.path import dirname
|
||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
import unittest
|
import unittest
|
||||||
from os.path import dirname
|
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
|
@ -22,11 +22,11 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from googleapiclient._auth import default_credentials, with_scopes
|
from googleapiclient._auth import default_credentials, with_scopes
|
||||||
|
from googleapiclient import discovery
|
||||||
|
|
||||||
from tests.contrib.utils.base_gcp_system_test_case import RetrieveVariables
|
from tests.contrib.utils.base_gcp_system_test_case import RetrieveVariables
|
||||||
from tests.contrib.utils.gcp_authenticator import GcpAuthenticator, GCP_GCS_TRANSFER_KEY
|
from tests.contrib.utils.gcp_authenticator import GcpAuthenticator, GCP_GCS_TRANSFER_KEY
|
||||||
from tests.contrib.utils.logging_command_executor import LoggingCommandExecutor
|
from tests.contrib.utils.logging_command_executor import LoggingCommandExecutor
|
||||||
from googleapiclient import discovery
|
|
||||||
|
|
||||||
|
|
||||||
retrieve_variables = RetrieveVariables()
|
retrieve_variables = RetrieveVariables()
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from unittest import mock
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
from airflow import configuration, DAG
|
from airflow import configuration, DAG
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest.mock import MagicMock, patch
|
||||||
import datetime
|
import datetime
|
||||||
from dateutil.tz import tzlocal
|
from dateutil.tz import tzlocal
|
||||||
from unittest.mock import MagicMock, patch
|
|
||||||
|
|
||||||
from airflow import configuration, AirflowException
|
from airflow import configuration, AirflowException
|
||||||
from airflow.contrib.sensors.emr_job_flow_sensor import EmrJobFlowSensor
|
from airflow.contrib.sensors.emr_job_flow_sensor import EmrJobFlowSensor
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import datetime
|
|
||||||
from unittest.mock import MagicMock, patch
|
from unittest.mock import MagicMock, patch
|
||||||
|
from datetime import datetime
|
||||||
from dateutil.tz import tzlocal
|
from dateutil.tz import tzlocal
|
||||||
|
|
||||||
from airflow import configuration, AirflowException
|
from airflow import configuration, AirflowException
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest.mock import MagicMock
|
||||||
|
|
||||||
from ftplib import error_perm
|
from ftplib import error_perm
|
||||||
from unittest.mock import MagicMock
|
|
||||||
|
|
||||||
from airflow.contrib.hooks.ftp_hook import FTPHook
|
from airflow.contrib.hooks.ftp_hook import FTPHook
|
||||||
from airflow.contrib.sensors.ftp_sensor import FTPSensor
|
from airflow.contrib.sensors.ftp_sensor import FTPSensor
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest.mock import patch
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from unittest.mock import patch
|
|
||||||
|
|
||||||
from airflow.contrib.sensors.qubole_sensor import QuboleFileSensor, QubolePartitionSensor
|
from airflow.contrib.sensors.qubole_sensor import QuboleFileSensor, QubolePartitionSensor
|
||||||
from airflow.exceptions import AirflowException
|
from airflow.exceptions import AirflowException
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import doctest
|
import doctest
|
||||||
from unittest import mock
|
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import os
|
import os
|
||||||
import pickle # type: ignore
|
import pickle # type: ignore
|
||||||
|
@ -30,6 +30,7 @@ import signal
|
||||||
import sqlalchemy
|
import sqlalchemy
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
|
from tempfile import NamedTemporaryFile
|
||||||
import warnings
|
import warnings
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from dateutil.relativedelta import relativedelta
|
from dateutil.relativedelta import relativedelta
|
||||||
|
@ -37,31 +38,26 @@ from email.mime.application import MIMEApplication
|
||||||
from email.mime.multipart import MIMEMultipart
|
from email.mime.multipart import MIMEMultipart
|
||||||
from email.mime.text import MIMEText
|
from email.mime.text import MIMEText
|
||||||
from numpy.testing import assert_array_almost_equal
|
from numpy.testing import assert_array_almost_equal
|
||||||
from tempfile import NamedTemporaryFile
|
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
from airflow import configuration
|
from airflow import configuration, jobs, models, DAG, utils, macros, settings, exceptions
|
||||||
|
from airflow.bin import cli
|
||||||
|
from airflow.configuration import AirflowConfigException, run_command
|
||||||
|
from airflow.exceptions import AirflowException
|
||||||
from airflow.executors import SequentialExecutor
|
from airflow.executors import SequentialExecutor
|
||||||
from airflow.models import Variable, TaskInstance
|
from airflow.hooks.base_hook import BaseHook
|
||||||
|
from airflow.hooks.sqlite_hook import SqliteHook
|
||||||
from airflow import jobs, models, DAG, utils, macros, settings, exceptions
|
from airflow.models import Variable, TaskInstance, BaseOperator, Connection, TaskFail
|
||||||
from airflow.models import BaseOperator, Connection, TaskFail
|
|
||||||
from airflow.operators.bash_operator import BashOperator
|
from airflow.operators.bash_operator import BashOperator
|
||||||
from airflow.operators.check_operator import CheckOperator, ValueCheckOperator
|
from airflow.operators.check_operator import CheckOperator, ValueCheckOperator
|
||||||
from airflow.operators.dagrun_operator import TriggerDagRunOperator
|
from airflow.operators.dagrun_operator import TriggerDagRunOperator
|
||||||
from airflow.operators.python_operator import PythonOperator
|
|
||||||
from airflow.operators.dummy_operator import DummyOperator
|
from airflow.operators.dummy_operator import DummyOperator
|
||||||
|
from airflow.operators.python_operator import PythonOperator
|
||||||
from airflow.hooks.base_hook import BaseHook
|
|
||||||
from airflow.hooks.sqlite_hook import SqliteHook
|
|
||||||
from airflow.bin import cli
|
|
||||||
from airflow.settings import Session
|
from airflow.settings import Session
|
||||||
from airflow.utils import timezone
|
from airflow.utils import timezone
|
||||||
from airflow.utils.timezone import datetime
|
|
||||||
from airflow.utils.state import State
|
|
||||||
from airflow.utils.dates import days_ago, infer_time_unit, round_time, scale_time_units
|
from airflow.utils.dates import days_ago, infer_time_unit, round_time, scale_time_units
|
||||||
from airflow.exceptions import AirflowException
|
from airflow.utils.state import State
|
||||||
from airflow.configuration import AirflowConfigException, run_command
|
from airflow.utils.timezone import datetime
|
||||||
from pendulum import utcnow
|
from pendulum import utcnow
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
|
|
@ -19,10 +19,10 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
import contextlib
|
import contextlib
|
||||||
from multiprocessing import Pool
|
from multiprocessing import Pool
|
||||||
|
|
||||||
from unittest import mock
|
|
||||||
|
|
||||||
from celery import Celery
|
from celery import Celery
|
||||||
from celery import states as celery_states
|
from celery import states as celery_states
|
||||||
|
@ -37,7 +37,7 @@ from airflow import configuration
|
||||||
configuration.load_test_config()
|
configuration.load_test_config()
|
||||||
|
|
||||||
# leave this it is used by the test worker
|
# leave this it is used by the test worker
|
||||||
import celery.contrib.testing.tasks # noqa: F401
|
import celery.contrib.testing.tasks # noqa: F401 pylint: disable=ungrouped-imports
|
||||||
|
|
||||||
|
|
||||||
def _prepare_test_bodies():
|
def _prepare_test_bodies():
|
||||||
|
|
|
@ -23,9 +23,9 @@ import itertools
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from unittest import mock
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from hmsclient import HMSClient
|
from hmsclient import HMSClient
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,9 @@
|
||||||
# specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
|
import unittest
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
|
||||||
|
|
||||||
from botocore.exceptions import NoCredentialsError
|
from botocore.exceptions import NoCredentialsError
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest.mock import patch
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
from cryptography.fernet import Fernet
|
from cryptography.fernet import Fernet
|
||||||
from unittest.mock import patch
|
|
||||||
from parameterized import parameterized
|
from parameterized import parameterized
|
||||||
|
|
||||||
from airflow.models import Connection, crypto
|
from airflow.models import Connection, crypto
|
||||||
|
|
|
@ -22,13 +22,13 @@ import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest.mock import patch
|
||||||
import uuid
|
import uuid
|
||||||
from tempfile import NamedTemporaryFile
|
from tempfile import NamedTemporaryFile
|
||||||
|
|
||||||
import jinja2
|
import jinja2
|
||||||
import pendulum
|
import pendulum
|
||||||
import six
|
import six
|
||||||
from unittest.mock import patch
|
|
||||||
|
|
||||||
from airflow import models, settings, configuration
|
from airflow import models, settings, configuration
|
||||||
from airflow.exceptions import AirflowException, AirflowDagCycleException
|
from airflow.exceptions import AirflowException, AirflowDagCycleException
|
||||||
|
|
|
@ -23,9 +23,8 @@ import os
|
||||||
import shutil
|
import shutil
|
||||||
import textwrap
|
import textwrap
|
||||||
import unittest
|
import unittest
|
||||||
from tempfile import mkdtemp, NamedTemporaryFile
|
|
||||||
|
|
||||||
from unittest.mock import patch, ANY
|
from unittest.mock import patch, ANY
|
||||||
|
from tempfile import mkdtemp, NamedTemporaryFile
|
||||||
|
|
||||||
from airflow import models, configuration
|
from airflow import models, configuration
|
||||||
from airflow.models import DagModel, DagBag, TaskInstance as TI
|
from airflow.models import DagModel, DagBag, TaskInstance as TI
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
import datetime
|
import datetime
|
||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest.mock import patch, mock_open
|
||||||
import urllib
|
import urllib
|
||||||
from typing import Union, List
|
from typing import Union, List
|
||||||
import pendulum
|
import pendulum
|
||||||
from freezegun import freeze_time
|
from freezegun import freeze_time
|
||||||
from unittest.mock import patch, mock_open
|
|
||||||
from parameterized import parameterized, param
|
from parameterized import parameterized, param
|
||||||
from sqlalchemy.orm.session import Session
|
from sqlalchemy.orm.session import Session
|
||||||
from airflow import models, settings, configuration
|
from airflow import models, settings, configuration
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest.mock import patch
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from unittest.mock import patch
|
|
||||||
|
|
||||||
from airflow import AirflowException
|
from airflow import AirflowException
|
||||||
from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest.mock import patch, PropertyMock, Mock
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import pymssql
|
import pymssql
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pymssql = None
|
pymssql = None
|
||||||
from unittest.mock import patch, PropertyMock, Mock
|
|
||||||
|
|
||||||
from airflow.operators.mssql_to_hive import MsSqlToHiveTransfer
|
from airflow.operators.mssql_to_hive import MsSqlToHiveTransfer
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,11 @@ import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
from tempfile import mkdtemp
|
from tempfile import mkdtemp
|
||||||
|
|
||||||
import boto3
|
import boto3
|
||||||
from unittest import mock
|
|
||||||
from moto import mock_s3
|
from moto import mock_s3
|
||||||
|
|
||||||
from airflow.exceptions import AirflowException
|
from airflow.exceptions import AirflowException
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
# KIND, either express or implied. See the License for the
|
# KIND, either express or implied. See the License for the
|
||||||
# specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
from unittest import mock
|
|
||||||
import os
|
import os
|
||||||
import psutil
|
import psutil
|
||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from airflow import models, settings
|
from airflow import models, settings
|
||||||
from airflow.jobs import LocalTaskJob
|
from airflow.jobs import LocalTaskJob
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest.mock import Mock
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from freezegun import freeze_time
|
from freezegun import freeze_time
|
||||||
from unittest.mock import Mock
|
|
||||||
|
|
||||||
from airflow.models import TaskInstance
|
from airflow.models import TaskInstance
|
||||||
from airflow.ti_deps.deps.not_in_retry_period_dep import NotInRetryPeriodDep
|
from airflow.ti_deps.deps.not_in_retry_period_dep import NotInRetryPeriodDep
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import datetime
|
|
||||||
from unittest.mock import Mock
|
from unittest.mock import Mock
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
from airflow.ti_deps.deps.not_running_dep import NotRunningDep
|
from airflow.ti_deps.deps.not_running_dep import NotRunningDep
|
||||||
from airflow.utils.state import State
|
from airflow.utils.state import State
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import datetime
|
|
||||||
from unittest.mock import Mock
|
from unittest.mock import Mock
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
from airflow.models import DAG, BaseOperator
|
from airflow.models import DAG, BaseOperator
|
||||||
from airflow.ti_deps.dep_context import DepContext
|
from airflow.ti_deps.dep_context import DepContext
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import timedelta
|
|
||||||
from unittest.mock import Mock, patch
|
from unittest.mock import Mock, patch
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
from airflow.models import DAG, TaskInstance, TaskReschedule
|
from airflow.models import DAG, TaskInstance, TaskReschedule
|
||||||
from airflow.ti_deps.dep_context import DepContext
|
from airflow.ti_deps.dep_context import DepContext
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import datetime
|
|
||||||
from unittest.mock import Mock
|
from unittest.mock import Mock
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
from airflow.models import DAG, BaseOperator
|
from airflow.models import DAG, BaseOperator
|
||||||
from airflow.ti_deps.dep_context import DepContext
|
from airflow.ti_deps.dep_context import DepContext
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import datetime
|
|
||||||
from unittest.mock import Mock
|
from unittest.mock import Mock
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
from airflow import AirflowException
|
from airflow import AirflowException
|
||||||
from airflow.ti_deps.deps.valid_state_dep import ValidStateDep
|
from airflow.ti_deps.deps.valid_state_dep import ValidStateDep
|
||||||
|
|
|
@ -23,9 +23,8 @@ import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
from datetime import timedelta
|
|
||||||
|
|
||||||
from unittest.mock import MagicMock
|
from unittest.mock import MagicMock
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
from airflow import configuration as conf
|
from airflow import configuration as conf
|
||||||
from airflow.jobs import DagFileProcessor
|
from airflow.jobs import DagFileProcessor
|
||||||
|
|
|
@ -18,9 +18,8 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
from airflow.utils import operator_helpers
|
from airflow.utils import operator_helpers
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import unittest
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
import os
|
import os
|
||||||
import socket
|
import socket
|
||||||
import unittest
|
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import logging
|
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
import logging
|
||||||
|
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
from flask_appbuilder import AppBuilder, SQLA, Model, has_access, expose
|
from flask_appbuilder import AppBuilder, SQLA, Model, has_access, expose
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from urllib.parse import parse_qs
|
from urllib.parse import parse_qs
|
||||||
|
|
||||||
from unittest import mock
|
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
from airflow.www import utils
|
from airflow.www import utils
|
||||||
|
|
|
@ -26,11 +26,11 @@ import shutil
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
import urllib
|
|
||||||
from datetime import timedelta
|
|
||||||
from urllib.parse import quote_plus
|
|
||||||
|
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
import urllib
|
||||||
|
from urllib.parse import quote_plus
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
import jinja2
|
import jinja2
|
||||||
from flask import Markup, url_for
|
from flask import Markup, url_for
|
||||||
from parameterized import parameterized
|
from parameterized import parameterized
|
||||||
|
|
Загрузка…
Ссылка в новой задаче