[AIRFLOW-4839] Fix pylint errors regarding superfluous-parens (#5465)
This commit is contained in:
Родитель
d5a5b9d9f1
Коммит
487ad38d60
|
@ -237,7 +237,7 @@ class GcpStorageTransferJobCreateOperatorTest(unittest.TestCase):
|
|||
def test_job_create_gcs(self, mock_hook):
|
||||
mock_hook.return_value.create_transfer_job.return_value = VALID_TRANSFER_JOB_GCS_RAW
|
||||
body = deepcopy(VALID_TRANSFER_JOB_GCS)
|
||||
del (body['name'])
|
||||
del body['name']
|
||||
op = GcpTransferServiceJobCreateOperator(body=body, task_id=TASK_ID)
|
||||
result = op.execute(None)
|
||||
|
||||
|
@ -255,7 +255,7 @@ class GcpStorageTransferJobCreateOperatorTest(unittest.TestCase):
|
|||
TEST_AWS_ACCESS_KEY_ID, TEST_AWS_ACCESS_SECRET, None
|
||||
)
|
||||
body = deepcopy(VALID_TRANSFER_JOB_AWS)
|
||||
del (body['name'])
|
||||
del body['name']
|
||||
op = GcpTransferServiceJobCreateOperator(body=body, task_id=TASK_ID)
|
||||
|
||||
result = op.execute(None)
|
||||
|
|
|
@ -194,26 +194,26 @@ class TestKubernetesWorkerConfiguration(unittest.TestCase):
|
|||
@mock.patch.object(configuration, 'as_dict')
|
||||
def test_worker_configuration_auth_both_ssh_and_user(self, mock_config_as_dict, mock_conf_get):
|
||||
def get_conf(*args, **kwargs):
|
||||
if(args[0] == 'core'):
|
||||
if args[0] == 'core':
|
||||
return '1'
|
||||
if(args[0] == 'kubernetes'):
|
||||
if(args[1] == 'git_ssh_known_hosts_configmap_name'):
|
||||
if args[0] == 'kubernetes':
|
||||
if args[1] == 'git_ssh_known_hosts_configmap_name':
|
||||
return 'airflow-configmap'
|
||||
if(args[1] == 'git_ssh_key_secret_name'):
|
||||
if args[1] == 'git_ssh_key_secret_name':
|
||||
return 'airflow-secrets'
|
||||
if(args[1] == 'git_user'):
|
||||
if args[1] == 'git_user':
|
||||
return 'some-user'
|
||||
if(args[1] == 'git_password'):
|
||||
if args[1] == 'git_password':
|
||||
return 'some-password'
|
||||
if(args[1] == 'git_repo'):
|
||||
if args[1] == 'git_repo':
|
||||
return 'git@github.com:apache/airflow.git'
|
||||
if(args[1] == 'git_branch'):
|
||||
if args[1] == 'git_branch':
|
||||
return 'master'
|
||||
if(args[1] == 'git_dags_folder_mount_point'):
|
||||
if args[1] == 'git_dags_folder_mount_point':
|
||||
return '/usr/local/airflow/dags'
|
||||
if(args[1] == 'delete_worker_pods'):
|
||||
if args[1] == 'delete_worker_pods':
|
||||
return True
|
||||
if(args[1] == 'kube_client_request_args'):
|
||||
if args[1] == 'kube_client_request_args':
|
||||
return '{"_request_timeout" : [60,360] }'
|
||||
return '1'
|
||||
return None
|
||||
|
|
Загрузка…
Ссылка в новой задаче