From 2f56ca0f9fb7c25b253884ad1ceae773265f3a9e Mon Sep 17 00:00:00 2001 From: jrmccluskey Date: Tue, 21 Jul 2026 19:36:24 +0000 Subject: [PATCH 1/2] Fix pyrefly check bad-typed-dict-key --- .../runners/interactive/dataproc/dataproc_cluster_manager.py | 4 +++- sdks/python/pyproject.toml | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sdks/python/apache_beam/runners/interactive/dataproc/dataproc_cluster_manager.py b/sdks/python/apache_beam/runners/interactive/dataproc/dataproc_cluster_manager.py index 817d4f6b583b..0b021c7f63b2 100644 --- a/sdks/python/apache_beam/runners/interactive/dataproc/dataproc_cluster_manager.py +++ b/sdks/python/apache_beam/runners/interactive/dataproc/dataproc_cluster_manager.py @@ -20,6 +20,8 @@ import logging import re import time +from typing import Any +from typing import Dict from typing import Optional from apache_beam import version as beam_version @@ -170,7 +172,7 @@ def create_flink_cluster(self) -> None: """Calls _create_cluster with a configuration that enables FlinkRunner.""" init_action_path = self.stage_init_action() # https://cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.Cluster - cluster = { + cluster: Dict[str, Any] = { 'project_id': self.cluster_metadata.project_id, 'cluster_name': self.cluster_metadata.cluster_name, 'config': { diff --git a/sdks/python/pyproject.toml b/sdks/python/pyproject.toml index 52f713466246..f37b34fa2607 100644 --- a/sdks/python/pyproject.toml +++ b/sdks/python/pyproject.toml @@ -216,4 +216,3 @@ bad-specialization = "ignore" bad-context-manager = "ignore" invalid-yield = "ignore" bad-argument-count = "ignore" -bad-typed-dict-key = "ignore" From bc6715cd92bfae0b7b837f30711306f74b3f1fbb Mon Sep 17 00:00:00 2001 From: jrmccluskey Date: Tue, 21 Jul 2026 20:14:17 +0000 Subject: [PATCH 2/2] fix non PEP 585 type usage --- .../runners/interactive/dataproc/dataproc_cluster_manager.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdks/python/apache_beam/runners/interactive/dataproc/dataproc_cluster_manager.py b/sdks/python/apache_beam/runners/interactive/dataproc/dataproc_cluster_manager.py index 0b021c7f63b2..45de5cb7d85b 100644 --- a/sdks/python/apache_beam/runners/interactive/dataproc/dataproc_cluster_manager.py +++ b/sdks/python/apache_beam/runners/interactive/dataproc/dataproc_cluster_manager.py @@ -21,7 +21,6 @@ import re import time from typing import Any -from typing import Dict from typing import Optional from apache_beam import version as beam_version @@ -172,7 +171,7 @@ def create_flink_cluster(self) -> None: """Calls _create_cluster with a configuration that enables FlinkRunner.""" init_action_path = self.stage_init_action() # https://cloud.google.com/php/docs/reference/cloud-dataproc/latest/V1.Cluster - cluster: Dict[str, Any] = { + cluster: dict[str, Any] = { 'project_id': self.cluster_metadata.project_id, 'cluster_name': self.cluster_metadata.cluster_name, 'config': {