Skip to content
Closed
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/api_connexion/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
if any(suffix in version.version for suffix in ['dev', 'a', 'b']):
doc_link = (
"http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/apache-airflow/latest"
"/stable-rest-api-ref.html"
+ "/stable-rest-api-ref.html"
)
else:
doc_link = f'https://airflow.apache.org/docs/{version.version}/stable-rest-api-ref.html'
Expand Down
2 changes: 1 addition & 1 deletion airflow/cli/cli_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _check_value(self, action, value):
except ImportError:
message = (
'The kubernetes subcommand requires that you pip install the kubernetes python client.'
"To do it, run: pip install 'apache-airflow[cncf.kubernetes]'"
+ "To do it, run: pip install 'apache-airflow[cncf.kubernetes]'"
)
raise ArgumentError(action, message)

Expand Down
2 changes: 1 addition & 1 deletion airflow/jobs/scheduler_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@ def _process_executor_events(self, session: Session = None) -> int:
Stats.incr('scheduler.tasks.killed_externally')
msg = (
"Executor reports task instance %s finished (%s) although the "
"task says its %s. (Info: %s) Was the task killed externally?"
+ "task says its %s. (Info: %s) Was the task killed externally?"
)
self.log.error(msg, ti, state, ti.state, info)
request = TaskCallbackRequest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def is_data_available(*args, **kwargs):
"/bin/bash",
"-c",
"/bin/sleep 30; "
"/bin/mv {{params.source_location}}/{{ ti.xcom_pull('view_file') }} {{params.target_location}};"
"/bin/echo '{{params.target_location}}/{{ ti.xcom_pull('view_file') }}';",
+ "/bin/mv {{params.source_location}}/{{ ti.xcom_pull('view_file') }} {{params.target_location}};"
+ "/bin/echo '{{params.target_location}}/{{ ti.xcom_pull('view_file') }}';",
],
task_id="move_data",
do_xcom_push=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
# [START howto_operator_gcp_datacatalog_lookup_entry_linked_resource]
current_entry_template = (
"//datacatalog.googleapis.com/projects/{project_id}/locations/{location}/"
"entryGroups/{entry_group}/entries/{entry}"
+ "entryGroups/{entry_group}/entries/{entry}"
)
lookup_entry_linked_resource = CloudDataCatalogLookupEntryOperator(
task_id="lookup_entry",
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/snowflake/hooks/snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def get_uri(self) -> str:
conn_config = self._get_conn_params()
uri = (
'snowflake://{user}:{password}@{account}/{database}/{schema}'
'?warehouse={warehouse}&role={role}&authenticator={authenticator}'
+ '?warehouse={warehouse}&role={role}&authenticator={authenticator}'
)
return uri.format(**conn_config)

Expand Down
2 changes: 1 addition & 1 deletion airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2645,7 +2645,7 @@ def conf(self):
else:
config = (
"# Your Airflow administrator chose not to expose the "
"configuration, most likely for security reasons."
+ "configuration, most likely for security reasons."
)
table = None

Expand Down
8 changes: 4 additions & 4 deletions airflow/www/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ class AirflowDateTimePickerWidget:

data_template = (
'<div class="input-group datetime datetimepicker">'
'<span class="input-group-addon"><span class="material-icons cursor-hand">calendar_today</span>'
"</span>"
'<input class="form-control" %(text)s />'
"</div>"
+ '<span class="input-group-addon"><span class="material-icons cursor-hand">calendar_today</span>'
+ "</span>"
+ '<input class="form-control" %(text)s />'
+ "</div>"
)

def __call__(self, field, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion kubernetes_tests/test_kubernetes_pod_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def test_volume_mount(self):

args = [
"echo \"retrieved from mount\" > /tmp/test_volume/test.txt "
"&& cat /tmp/test_volume/test.txt"
+ "&& cat /tmp/test_volume/test.txt"
]
k = KubernetesPodOperator(
namespace='default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def test_volume_mount(self):
volume = Volume(name='test-volume', configs=volume_config)
args = [
"echo \"retrieved from mount\" > /tmp/test_volume/test.txt "
"&& cat /tmp/test_volume/test.txt"
+ "&& cat /tmp/test_volume/test.txt"
]
k = KubernetesPodOperator(
namespace='default',
Expand Down
3 changes: 3 additions & 0 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -592,3 +592,6 @@ min-public-methods=0
# Exceptions that will emit a warning when being caught. Defaults to
# "Exception".
overgeneral-exceptions=Exception

[STRING_CONSTANT]
check-str-concat-over-line-jumps=yes
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def write_version(filename: str = os.path.join(*[my_dir, "airflow", "git_version

_SPHINX_AIRFLOW_THEME_URL = (
"https://github.com/apache/airflow-site/releases/download/v0.0.1/"
"sphinx_airflow_theme-0.0.1-py3-none-any.whl"
+ "sphinx_airflow_theme-0.0.1-py3-none-any.whl"
)

# 'Start dependencies group' and 'Start dependencies group' are mark for ./scripts/ci/check_order_setup.py
Expand Down
4 changes: 2 additions & 2 deletions tests/always/test_project_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ class TestGoogleProviderProjectStructure(unittest.TestCase):
'airflow.providers.google.cloud.operators.tasks.CloudTasksQueuesListOperator',
# Deprecated operator. Ignore it.
'airflow.providers.google.cloud.operators.cloud_storage_transfer_service'
'.CloudDataTransferServiceS3ToGCSOperator',
+ '.CloudDataTransferServiceS3ToGCSOperator',
# Deprecated operator. Ignore it.
'airflow.providers.google.cloud.operators.cloud_storage_transfer_service'
'.CloudDataTransferServiceGCSToGCSOperator',
+ '.CloudDataTransferServiceGCSToGCSOperator',
# Base operator. Ignore it.
'airflow.providers.google.cloud.operators.cloud_sql.CloudSQLBaseOperator',
# Deprecated operator. Ignore it
Expand Down
2 changes: 1 addition & 1 deletion tests/api_connexion/endpoints/test_dag_run_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ class TestGetDagRunsPaginationFilters(TestDagRunEndpoint):
),
(
"api/v1/dags/TEST_DAG_ID/dagRuns?start_date_lte= 2020-06-15T18:00:00+00:00"
"&start_date_gte=2020-06-12T18:00:00Z",
+ "&start_date_gte=2020-06-12T18:00:00Z",
[
"TEST_START_EXEC_DAY_12",
"TEST_START_EXEC_DAY_13",
Expand Down
8 changes: 4 additions & 4 deletions tests/api_connexion/endpoints/test_task_instance_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class TestGetTaskInstances(TestTaskInstanceEndpoint):
True,
(
"/api/v1/dags/example_python_operator/dagRuns/TEST_DAG_RUN_ID/"
"taskInstances?duration_gte=100&duration_lte=200"
+ "taskInstances?duration_gte=100&duration_lte=200"
),
3,
),
Expand All @@ -343,7 +343,7 @@ class TestGetTaskInstances(TestTaskInstanceEndpoint):
False,
(
"/api/v1/dags/example_python_operator/dagRuns/"
"TEST_DAG_RUN_ID/taskInstances?state=running,queued"
+ "TEST_DAG_RUN_ID/taskInstances?state=running,queued"
),
2,
),
Expand All @@ -357,7 +357,7 @@ class TestGetTaskInstances(TestTaskInstanceEndpoint):
True,
(
"/api/v1/dags/example_python_operator/dagRuns/"
"TEST_DAG_RUN_ID/taskInstances?pool=test_pool_1,test_pool_2"
+ "TEST_DAG_RUN_ID/taskInstances?pool=test_pool_1,test_pool_2"
),
2,
),
Expand All @@ -382,7 +382,7 @@ class TestGetTaskInstances(TestTaskInstanceEndpoint):
True,
(
"/api/v1/dags/example_python_operator/dagRuns/TEST_DAG_RUN_ID"
"/taskInstances?queue=test_queue_1,test_queue_2"
+ "/taskInstances?queue=test_queue_1,test_queue_2"
),
2,
),
Expand Down
42 changes: 21 additions & 21 deletions tests/cli/commands/test_connection_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,23 +349,23 @@ def test_cli_connections_export_should_export_as_yaml(self, mock_file_open, mock

expected_connections = (
"airflow_db:\n"
" conn_type: mysql\n"
" description: mysql conn description\n"
" extra: null\n"
" host: mysql\n"
" login: root\n"
" password: plainpassword\n"
" port: null\n"
" schema: airflow\n"
"druid_broker_default:\n"
" conn_type: druid\n"
" description: druid-broker conn description\n"
" extra: \'{\"endpoint\": \"druid/v2/sql\"}\'\n"
" host: druid-broker\n"
" login: null\n"
" password: null\n"
" port: 8082\n"
" schema: null\n"
+ " conn_type: mysql\n"
+ " description: mysql conn description\n"
+ " extra: null\n"
+ " host: mysql\n"
+ " login: root\n"
+ " password: plainpassword\n"
+ " port: null\n"
+ " schema: airflow\n"
+ "druid_broker_default:\n"
+ " conn_type: druid\n"
+ " description: druid-broker conn description\n"
+ " extra: \'{\"endpoint\": \"druid/v2/sql\"}\'\n"
+ " host: druid-broker\n"
+ " login: null\n"
+ " password: null\n"
+ " port: 8082\n"
+ " schema: null\n"
)
mock_splittext.assert_called_once()
mock_file_open.assert_called_once_with(output_filepath, 'w', -1, 'UTF-8', None)
Expand All @@ -388,9 +388,9 @@ def test_cli_connections_export_should_export_as_env(self, mock_file_open, mock_

expected_connections = [
"airflow_db=mysql://root:plainpassword@mysql/airflow\n"
"druid_broker_default=druid://druid-broker:8082?endpoint=druid%2Fv2%2Fsql\n",
+ "druid_broker_default=druid://druid-broker:8082?endpoint=druid%2Fv2%2Fsql\n",
"druid_broker_default=druid://druid-broker:8082?endpoint=druid%2Fv2%2Fsql\n"
"airflow_db=mysql://root:plainpassword@mysql/airflow\n",
+ "airflow_db=mysql://root:plainpassword@mysql/airflow\n",
]

mock_splittext.assert_called_once()
Expand All @@ -417,9 +417,9 @@ def test_cli_connections_export_should_export_as_env_for_uppercase_file_extensio

expected_connections = [
"airflow_db=mysql://root:plainpassword@mysql/airflow\n"
"druid_broker_default=druid://druid-broker:8082?endpoint=druid%2Fv2%2Fsql\n",
+ "druid_broker_default=druid://druid-broker:8082?endpoint=druid%2Fv2%2Fsql\n",
"druid_broker_default=druid://druid-broker:8082?endpoint=druid%2Fv2%2Fsql\n"
"airflow_db=mysql://root:plainpassword@mysql/airflow\n",
+ "airflow_db=mysql://root:plainpassword@mysql/airflow\n",
]

mock_splittext.assert_called_once()
Expand Down
6 changes: 3 additions & 3 deletions tests/cli/commands/test_webserver_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ def test_cli_webserver_access_log_format(self):
# json access log format
access_logformat = (
"{\"ts\":\"%(t)s\",\"remote_ip\":\"%(h)s\",\"request_id\":\"%({"
"X-Request-Id}i)s\",\"code\":\"%(s)s\",\"request_method\":\"%(m)s\","
"\"request_path\":\"%(U)s\",\"agent\":\"%(a)s\",\"response_time\":\"%(D)s\","
"\"response_length\":\"%(B)s\"} "
+ "X-Request-Id}i)s\",\"code\":\"%(s)s\",\"request_method\":\"%(m)s\","
+ "\"request_path\":\"%(U)s\",\"agent\":\"%(a)s\",\"response_time\":\"%(D)s\","
+ "\"response_length\":\"%(B)s\"} "
)
with tempfile.TemporaryDirectory() as tmpdir, mock.patch.dict(
"os.environ",
Expand Down
Loading