Content-Length: 464748 | pFad | https://github.com/apache/airflow/commit/8e7b1add435164112b80b9319ec0b2f2df94fa12

37 Remove unused loop variable from airflow package (#38308) · apache/airflow@8e7b1ad · GitHub
Skip to content

Commit 8e7b1ad

Browse files
Remove unused loop variable from airflow package (#38308)
1 parent 9f9ae33 commit 8e7b1ad

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

airflow/dag_processing/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ def prepare_file_path_queue(self):
11771177
]
11781178

11791179
if self.log.isEnabledFor(logging.DEBUG):
1180-
for file_path, processor in self._processors.items():
1180+
for processor in self._processors.values():
11811181
self.log.debug(
11821182
"File path %s is still being processed (started: %s)",
11831183
processor.file_path,

airflow/jobs/scheduler_job_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class ConcurrencyMap:
110110
@classmethod
111111
def from_concurrency_map(cls, mapping: dict[tuple[str, str, str], int]) -> ConcurrencyMap:
112112
instance = cls(Counter(), Counter(), Counter(mapping))
113-
for (d, r, t), c in mapping.items():
113+
for (d, _, t), c in mapping.items():
114114
instance.dag_active_tasks_map[d] += c
115115
instance.task_concurrency_map[(d, t)] += c
116116
return instance

airflow/providers/google/cloud/hooks/bigquery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3185,7 +3185,7 @@ def _validate_src_fmt_configs(
31853185
if k not in src_fmt_configs and k in valid_configs:
31863186
src_fmt_configs[k] = v
31873187

3188-
for k, v in src_fmt_configs.items():
3188+
for k in src_fmt_configs:
31893189
if k not in valid_configs:
31903190
raise ValueError(f"{k} is not a valid src_fmt_configs for type {source_format}.")
31913191

airflow/providers/google/cloud/transfers/gcs_to_bigquery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ def _validate_src_fmt_configs(
714714
if k not in src_fmt_configs and k in valid_configs:
715715
src_fmt_configs[k] = v
716716

717-
for k, v in src_fmt_configs.items():
717+
for k in src_fmt_configs:
718718
if k not in valid_configs:
719719
raise ValueError(f"{k} is not a valid src_fmt_configs for type {source_format}.")
720720

airflow/providers/weaviate/hooks/weaviate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ def _process_batch_errors(
459459
client.batch.configure(**batch_config_params)
460460
with client.batch as batch:
461461
# Batch import all data
462-
for index, data_obj in enumerate(converted_data):
462+
for data_obj in converted_data:
463463
for attempt in Retrying(
464464
stop=stop_after_attempt(retry_attempts_per_object),
465465
retry=(

airflow/www/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ class AirflowFilterConverter(fab_sqlafilters.SQLAFilterConverter):
790790
def __init__(self, datamodel):
791791
super().__init__(datamodel)
792792

793-
for method, filters in self.conversion_table:
793+
for _, filters in self.conversion_table:
794794
if FilterIsNull not in filters:
795795
filters.append(FilterIsNull)
796796
if FilterIsNotNull not in filters:

airflow/www/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,7 +2147,7 @@ def trigger(self, dag_id: str, session: Session = NEW_SESSION):
21472147
flash(f"{ve}", "error")
21482148
form = DateTimeForm(data={"execution_date": execution_date})
21492149
# Take over "bad" submitted fields for new form display
2150-
for k, v in form_fields.items():
2150+
for k in form_fields:
21512151
if k in run_conf:
21522152
form_fields[k]["value"] = run_conf[k]
21532153
return self.render_template(
@@ -4579,7 +4579,7 @@ def process_form(self, form, is_created):
45794579
)
45804580
del form.extra
45814581
del extra_json
4582-
for key, field_name, is_sensitive in self._iter_extra_field_names_and_sensitivity():
4582+
for key, field_name, _ in self._iter_extra_field_names_and_sensitivity():
45834583
if key in form.data and key.startswith("extra__"):
45844584
conn_type_from_extra_field = key.split("__")[1]
45854585
if conn_type_from_extra_field == conn_type:

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/apache/airflow/commit/8e7b1add435164112b80b9319ec0b2f2df94fa12

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy