This is an automated email from the ASF dual-hosted git repository.
Lee-W pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new fa510cdf1e8 Remove unused mypy suppressions in common providers
(#75257)
fa510cdf1e8 is described below
commit fa510cdf1e8ec8a4253a1a23b8bccf7cdc7ffee2
Author: CA <[email protected]>
AuthorDate: Wed Oct 21 14:07:36 2026 +0800
Remove unused mypy suppressions in common providers (#75257)
---
providers/common/ai/pyproject.toml | 2 +-
.../ai/src/airflow/providers/common/ai/durable/strands.py | 4 ++--
.../common/ai/example_dags/example_agent_capabilities.py | 2 +-
.../common/ai/example_dags/example_sandbox_toolset.py | 2 +-
.../ai/src/airflow/providers/common/ai/operators/agent.py | 2 +-
.../ai/src/airflow/providers/common/ai/tools/strands.py | 2 +-
.../ai/src/airflow/providers/common/ai/utils/decision.py | 2 +-
.../ai/tests/unit/common/ai/durable/test_fingerprint.py | 6 +++---
.../ai/tests/unit/common/ai/hooks/test_pydantic_ai.py | 2 +-
.../common/ai/tests/unit/common/ai/mixins/test_approval.py | 2 +-
.../unit/common/ai/operators/test_llamaindex_embedding.py | 2 +-
.../unit/common/ai/operators/test_llamaindex_retrieval.py | 2 +-
.../common/ai/tests/unit/common/ai/operators/test_llm.py | 2 +-
.../ai/tests/unit/common/ai/operators/test_llm_branch.py | 2 +-
.../unit/common/ai/operators/test_llm_schema_compare.py | 2 +-
.../ai/tests/unit/common/ai/policies/test_decision.py | 2 +-
.../common/ai/tests/unit/common/ai/policies/test_retry.py | 14 +++++++-------
.../common/ai/tests/unit/common/ai/sandbox/test_base.py | 4 ++--
.../common/ai/tests/unit/common/ai/sandbox/test_modal.py | 2 +-
.../common/ai/tests/unit/common/ai/sandbox/test_sbx.py | 2 +-
.../common/ai/tests/unit/common/ai/tools/test_strands.py | 2 +-
.../ai/tests/unit/common/ai/toolsets/test_managed_agent.py | 2 +-
.../compat/tests/unit/common/compat/test__retry_policy.py | 4 ++--
providers/common/io/pyproject.toml | 2 +-
.../system/common/io/example_file_transfer_local_to_s3.py | 2 +-
providers/common/sql/pyproject.toml | 2 +-
.../sql/tests/unit/common/sql/operators/test_analytics.py | 2 +-
27 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/providers/common/ai/pyproject.toml
b/providers/common/ai/pyproject.toml
index 8dc592af3b3..5808a14f79e 100644
--- a/providers/common/ai/pyproject.toml
+++ b/providers/common/ai/pyproject.toml
@@ -66,7 +66,7 @@ requires-python = ">=3.11"
# After you modify the dependencies, and rebuild your Breeze CI image with
``breeze ci-image build``
dependencies = [
"apache-airflow>=2.11.0",
- "apache-airflow-providers-common-compat>=1.21.0",
+ "apache-airflow-providers-common-compat>=1.21.0", # use next version
"apache-airflow-providers-standard>=1.20.0",
# 2.33.0 is the first release that works with anthropic>=1: it moved to
httpx2 alongside
# the SDK and stopped passing temperature/top_p/top_k as messages.create()
kwargs, both
diff --git
a/providers/common/ai/src/airflow/providers/common/ai/durable/strands.py
b/providers/common/ai/src/airflow/providers/common/ai/durable/strands.py
index 7050c4e6ba8..01044ac747e 100644
--- a/providers/common/ai/src/airflow/providers/common/ai/durable/strands.py
+++ b/providers/common/ai/src/airflow/providers/common/ai/durable/strands.py
@@ -165,7 +165,7 @@ def invoke_durably(
request = prompt
# Strands types the prompt as AgentInput, which leaves out its
checkpointResume block.
- result = agent(request) # type: ignore[arg-type]
+ result = agent(request)
while result.checkpoint is not None:
checkpoint = result.checkpoint.to_dict()
# In the snapshot itself, so the conversation and the pause it belongs
to are saved
@@ -173,7 +173,7 @@ def invoke_durably(
agent.state.set(_CHECKPOINT_STATE_KEY, {"checkpoint": checkpoint,
"prompt": prompt_fingerprint})
run_coroutine_sync(session_manager.save_snapshot(agent,
is_latest=True))
log.debug("Saved a Strands checkpoint", session_id=session_id,
**checkpoint)
- result = agent(_build_checkpoint_resume(checkpoint)) # type:
ignore[arg-type]
+ result = agent(_build_checkpoint_resume(checkpoint))
try:
run_coroutine_sync(session_manager.delete_session())
diff --git
a/providers/common/ai/src/airflow/providers/common/ai/example_dags/example_agent_capabilities.py
b/providers/common/ai/src/airflow/providers/common/ai/example_dags/example_agent_capabilities.py
index 6abfb741b55..11a554cd2bd 100644
---
a/providers/common/ai/src/airflow/providers/common/ai/example_dags/example_agent_capabilities.py
+++
b/providers/common/ai/src/airflow/providers/common/ai/example_dags/example_agent_capabilities.py
@@ -37,7 +37,7 @@ except Exception:
try:
from pydantic_ai_shields import InputGuard
except ImportError:
- InputGuard = None # type: ignore[assignment,misc]
+ InputGuard = None
# ---------------------------------------------------------------------------
# 1. Thinking capability: enable model reasoning at a configurable effort level
# ---------------------------------------------------------------------------
diff --git
a/providers/common/ai/src/airflow/providers/common/ai/example_dags/example_sandbox_toolset.py
b/providers/common/ai/src/airflow/providers/common/ai/example_dags/example_sandbox_toolset.py
index 9e9291f5a32..e10a1706ac9 100644
---
a/providers/common/ai/src/airflow/providers/common/ai/example_dags/example_sandbox_toolset.py
+++
b/providers/common/ai/src/airflow/providers/common/ai/example_dags/example_sandbox_toolset.py
@@ -61,7 +61,7 @@ try:
from airflow.providers.common.ai.sandbox import ModalSandboxBackend
except Exception:
modal = None # type: ignore[assignment]
- ModalSandboxBackend = None # type: ignore[assignment,misc]
+ ModalSandboxBackend = None
# Pydantic output classes live at module scope so downstream tasks can
re-import
diff --git
a/providers/common/ai/src/airflow/providers/common/ai/operators/agent.py
b/providers/common/ai/src/airflow/providers/common/ai/operators/agent.py
index 2392a1fdd19..58f4c8b730c 100644
--- a/providers/common/ai/src/airflow/providers/common/ai/operators/agent.py
+++ b/providers/common/ai/src/airflow/providers/common/ai/operators/agent.py
@@ -1097,7 +1097,7 @@ class AgentOperator(CancellableAgentRunMixin,
BaseOperator, HITLReviewMixin, Usa
if self.enable_hitl_review:
self._output_under_review = output
- self.run_hitl_review( # type: ignore[misc]
+ self.run_hitl_review(
context,
output,
message_history=result.all_messages(),
diff --git
a/providers/common/ai/src/airflow/providers/common/ai/tools/strands.py
b/providers/common/ai/src/airflow/providers/common/ai/tools/strands.py
index 5bdeccadeba..2fb7d3416f0 100644
--- a/providers/common/ai/src/airflow/providers/common/ai/tools/strands.py
+++ b/providers/common/ai/src/airflow/providers/common/ai/tools/strands.py
@@ -111,7 +111,7 @@ class AirflowTools(Plugin):
return self._name
@property
- def tools(self) -> list[AgentTool]: # type: ignore[override]
+ def tools(self) -> list[AgentTool]:
# Plugin types this as its decorated tools; the registry takes any
AgentTool.
return self._airflow_tools
diff --git
a/providers/common/ai/src/airflow/providers/common/ai/utils/decision.py
b/providers/common/ai/src/airflow/providers/common/ai/utils/decision.py
index 32193d1c2fd..95d30301b13 100644
--- a/providers/common/ai/src/airflow/providers/common/ai/utils/decision.py
+++ b/providers/common/ai/src/airflow/providers/common/ai/utils/decision.py
@@ -94,7 +94,7 @@ def _choice_types() -> tuple[Any, Any]:
global Choice, Choices
if Choice is _NOT_LOADED or Choices is _NOT_LOADED:
try:
- from pydantic_ai import ( # type: ignore[attr-defined]
+ from pydantic_ai import (
Choice as loaded_choice,
Choices as loaded_choices,
)
diff --git
a/providers/common/ai/tests/unit/common/ai/durable/test_fingerprint.py
b/providers/common/ai/tests/unit/common/ai/durable/test_fingerprint.py
index 9cfa70f9e95..1a281193941 100644
--- a/providers/common/ai/tests/unit/common/ai/durable/test_fingerprint.py
+++ b/providers/common/ai/tests/unit/common/ai/durable/test_fingerprint.py
@@ -349,7 +349,7 @@ class TestModelRequestFingerprint:
assert live == replayed
def test_unserializable_request_returns_none(self):
- fp = fingerprint_model_request("m", [object()], None,
ModelRequestParameters()) # type: ignore[list-item]
+ fp = fingerprint_model_request("m", [object()], None,
ModelRequestParameters())
assert fp is None
@@ -358,7 +358,7 @@ class TestModelRequestFingerprint:
process-local reprs that would never match on retry."""
fp = fingerprint_model_request(
"m", make_messages(), {"extra_body": object()},
ModelRequestParameters()
- ) # type: ignore[typeddict-item]
+ )
assert fp is None
@@ -1075,7 +1075,7 @@ class TestAliasedAndRootModelSets:
class Aliased:
tags: set[str] = pydantic.Field(alias="labels")
- assert _render(Aliased(labels=_MANY)) == {"labels": sorted(_MANY)} #
type: ignore[call-arg]
+ assert _render(Aliased(labels=_MANY)) == {"labels": sorted(_MANY)}
def _earlier_tool_fingerprint(name, tool_args, tool_call_id):
diff --git a/providers/common/ai/tests/unit/common/ai/hooks/test_pydantic_ai.py
b/providers/common/ai/tests/unit/common/ai/hooks/test_pydantic_ai.py
index 3aa297c3bd4..2340189bb91 100644
--- a/providers/common/ai/tests/unit/common/ai/hooks/test_pydantic_ai.py
+++ b/providers/common/ai/tests/unit/common/ai/hooks/test_pydantic_ai.py
@@ -986,7 +986,7 @@ class TestPydanticAIHookFallback:
"""``Connection.get_hook`` dispatches on conn_type alone and can
return anything."""
registry.add("primary", extra={"model": "openai:gpt-5.6-sol"})
registry.add("wrong_type", conn_type="langchain")
- registry.hook_classes["wrong_type"] = MagicMock # type:
ignore[assignment]
+ registry.hook_classes["wrong_type"] = MagicMock
hook = PydanticAIHook(llm_conn_id="primary",
fallback_conn_ids=["wrong_type"])
with pytest.raises(ValueError, match="not a PydanticAIHook"):
diff --git a/providers/common/ai/tests/unit/common/ai/mixins/test_approval.py
b/providers/common/ai/tests/unit/common/ai/mixins/test_approval.py
index 5b727c28d2e..a8320d44156 100644
--- a/providers/common/ai/tests/unit/common/ai/mixins/test_approval.py
+++ b/providers/common/ai/tests/unit/common/ai/mixins/test_approval.py
@@ -322,7 +322,7 @@ class TestDeferForApproval:
assert call_kwargs["params"] == {}
def test_raises_on_non_string_prompt(self, context):
- op = FakeOperator(prompt=["Describe this:", object()]) # type:
ignore[arg-type]
+ op = FakeOperator(prompt=["Describe this:", object()])
with pytest.raises(TypeError, match="non-string prompt"):
op.defer_for_approval(context, "output")
diff --git
a/providers/common/ai/tests/unit/common/ai/operators/test_llamaindex_embedding.py
b/providers/common/ai/tests/unit/common/ai/operators/test_llamaindex_embedding.py
index 0d647f372e0..f744a757f21 100644
---
a/providers/common/ai/tests/unit/common/ai/operators/test_llamaindex_embedding.py
+++
b/providers/common/ai/tests/unit/common/ai/operators/test_llamaindex_embedding.py
@@ -160,7 +160,7 @@ class TestEmbeddingOperatorExecute:
op = LlamaIndexEmbeddingOperator(
task_id="test",
documents=[{"text": "doc"}],
- embed_model=12345, # type: ignore[arg-type]
+ embed_model=12345,
)
with pytest.raises(TypeError, match="embed_model must be"):
op.execute(context=MagicMock())
diff --git
a/providers/common/ai/tests/unit/common/ai/operators/test_llamaindex_retrieval.py
b/providers/common/ai/tests/unit/common/ai/operators/test_llamaindex_retrieval.py
index 320211e3eed..e3c720dfd0a 100644
---
a/providers/common/ai/tests/unit/common/ai/operators/test_llamaindex_retrieval.py
+++
b/providers/common/ai/tests/unit/common/ai/operators/test_llamaindex_retrieval.py
@@ -170,7 +170,7 @@ class TestRetrievalOperatorOutput:
task_id="test",
query="q",
index_persist_dir=str(tmp_path / "idx"),
- embed_model=12345, # type: ignore[arg-type]
+ embed_model=12345,
)
with pytest.raises(TypeError, match="embed_model must be"):
op.execute(context=MagicMock())
diff --git a/providers/common/ai/tests/unit/common/ai/operators/test_llm.py
b/providers/common/ai/tests/unit/common/ai/operators/test_llm.py
index dec9efaa1b4..0fc57ecdb51 100644
--- a/providers/common/ai/tests/unit/common/ai/operators/test_llm.py
+++ b/providers/common/ai/tests/unit/common/ai/operators/test_llm.py
@@ -1052,7 +1052,7 @@ class TestLLMOperatorConfidenceGate:
"""The multimodal-prompt guard applies to any review path, not only
require_approval."""
op = LLMOperator(
task_id="t",
- prompt=[{"type": "text", "text": "p"}], # type: ignore[arg-type]
+ prompt=[{"type": "text", "text": "p"}],
llm_conn_id="c",
decision_policy=DecisionPolicy(min_confidence=0.7),
)
diff --git
a/providers/common/ai/tests/unit/common/ai/operators/test_llm_branch.py
b/providers/common/ai/tests/unit/common/ai/operators/test_llm_branch.py
index 8960add157e..267b7fc96b2 100644
--- a/providers/common/ai/tests/unit/common/ai/operators/test_llm_branch.py
+++ b/providers/common/ai/tests/unit/common/ai/operators/test_llm_branch.py
@@ -1217,7 +1217,7 @@ class TestLLMBranchOperatorApproval:
op = LLMBranchOperator(
task_id="test",
- prompt=["describe", b"bytes"], # type: ignore[arg-type]
+ prompt=["describe", b"bytes"],
llm_conn_id="my_llm",
require_approval=True,
)
diff --git
a/providers/common/ai/tests/unit/common/ai/operators/test_llm_schema_compare.py
b/providers/common/ai/tests/unit/common/ai/operators/test_llm_schema_compare.py
index ffabb18f47e..d26b0d9efaa 100644
---
a/providers/common/ai/tests/unit/common/ai/operators/test_llm_schema_compare.py
+++
b/providers/common/ai/tests/unit/common/ai/operators/test_llm_schema_compare.py
@@ -830,7 +830,7 @@ class TestLLMSchemaCompareOperatorApproval:
def test_execute_rejects_sequence_prompt_with_require_approval(self):
op = LLMSchemaCompareOperator(
task_id="test_task",
- prompt=["describe", b"bytes"], # type: ignore[arg-type]
+ prompt=["describe", b"bytes"],
llm_conn_id="llm_conn",
**self._APPROVAL_KWARGS,
)
diff --git a/providers/common/ai/tests/unit/common/ai/policies/test_decision.py
b/providers/common/ai/tests/unit/common/ai/policies/test_decision.py
index d92f44ec023..3f4fde2116e 100644
--- a/providers/common/ai/tests/unit/common/ai/policies/test_decision.py
+++ b/providers/common/ai/tests/unit/common/ai/policies/test_decision.py
@@ -51,7 +51,7 @@ class TestDecisionPolicy:
def test_is_frozen(self):
with pytest.raises(AttributeError):
- DecisionPolicy().min_confidence = 0.5 # type: ignore[misc]
+ DecisionPolicy().min_confidence = 0.5
def test_validate_accepts_none_and_a_policy_only(self):
assert validate_decision_policy(None) == DecisionPolicy()
diff --git a/providers/common/ai/tests/unit/common/ai/policies/test_retry.py
b/providers/common/ai/tests/unit/common/ai/policies/test_retry.py
index 254f4105091..a317988efe8 100644
--- a/providers/common/ai/tests/unit/common/ai/policies/test_retry.py
+++ b/providers/common/ai/tests/unit/common/ai/policies/test_retry.py
@@ -118,13 +118,13 @@ class TestErrorCategory:
def test_int_seconds_delay_is_rejected(self):
"""Int seconds was the shape of the removed
``suggested_delay_seconds`` field."""
with pytest.raises(TypeError, match="must be a timedelta or None, got
60"):
- ErrorCategory("x", delay=60) # type: ignore[arg-type]
+ ErrorCategory("x", delay=60)
@pytest.mark.parametrize("retry", ["false", None, 0])
def test_retry_must_be_a_bool(self, retry):
"""A truthy string here would retry a category the author meant to
fail."""
with pytest.raises(TypeError, match="retry must be True or False"):
- ErrorCategory("x", retry=retry) # type: ignore[arg-type]
+ ErrorCategory("x", retry=retry)
def test_negative_delay_is_rejected(self):
with pytest.raises(ValueError, match="must not be negative"):
@@ -139,14 +139,14 @@ class TestErrorCategory:
with pytest.raises(ValueError, match="ErrorCategory.min_confidence
must be between 0 and 1"):
ErrorCategory("x", min_confidence=1.5)
with pytest.raises(TypeError, match="ErrorCategory.min_confidence must
be a number"):
- ErrorCategory("x", min_confidence="0.5") # type: ignore[arg-type]
+ ErrorCategory("x", min_confidence="0.5")
class TestDefaultCategories:
def test_cannot_be_mutated(self):
"""The default table is shared by every policy instance, so it must be
read-only."""
with pytest.raises(TypeError):
- DEFAULT_CATEGORIES["auth"] = ErrorCategory("x") # type:
ignore[index]
+ DEFAULT_CATEGORIES["auth"] = ErrorCategory("x")
def test_documented_split(self):
"""Spelled out here on purpose: the docs list this table, so a drift
shows up as a test failure."""
@@ -181,7 +181,7 @@ class TestClassifierRetryPolicyConstruction:
def test_categories_must_be_a_mapping(self):
with pytest.raises(TypeError, match="categories must be a mapping"):
- ClassifierRetryPolicy(llm_conn_id="test",
categories=[ErrorCategory("x")]) # type: ignore[arg-type]
+ ClassifierRetryPolicy(llm_conn_id="test",
categories=[ErrorCategory("x")])
@pytest.mark.parametrize("categories", [{}, {"only": ErrorCategory("x")}])
def test_fewer_than_two_categories_is_rejected(self, categories):
@@ -198,7 +198,7 @@ class TestClassifierRetryPolicyConstruction:
def test_category_values_must_be_error_categories(self):
"""A bare string is not a description here: retry and delay would have
nowhere to live."""
with pytest.raises(TypeError, match=r"categories\['a'\] must be an
ErrorCategory, got str"):
- ClassifierRetryPolicy(llm_conn_id="test", categories={"a":
"flaky", "b": ErrorCategory("y")}) # type: ignore[dict-item]
+ ClassifierRetryPolicy(llm_conn_id="test", categories={"a":
"flaky", "b": ErrorCategory("y")})
def test_category_bar_needs_a_policy_bar_to_inherit(self):
with pytest.raises(
@@ -1082,7 +1082,7 @@ class TestOnUncertain:
def test_fallback_policy_must_be_a_retry_policy(self):
with pytest.raises(TypeError, match="fallback_policy must be a
RetryPolicy"):
- ClassifierRetryPolicy(llm_conn_id="jev", min_confidence=0.5,
fallback_policy="llm") # type: ignore[arg-type]
+ ClassifierRetryPolicy(llm_conn_id="jev", min_confidence=0.5,
fallback_policy="llm")
@patch(HOOK, autospec=True)
def test_confident_classifier_answer_never_consults_the_llm(self,
mock_hook_cls):
diff --git a/providers/common/ai/tests/unit/common/ai/sandbox/test_base.py
b/providers/common/ai/tests/unit/common/ai/sandbox/test_base.py
index 02bff63dd97..34c78a074cd 100644
--- a/providers/common/ai/tests/unit/common/ai/sandbox/test_base.py
+++ b/providers/common/ai/tests/unit/common/ai/sandbox/test_base.py
@@ -81,7 +81,7 @@ class TestSandboxSpec:
spec = SandboxSpec()
with pytest.raises(AttributeError):
- spec.block_network = False # type: ignore[misc]
+ spec.block_network = False
class TestSandboxExecResult:
@@ -113,7 +113,7 @@ class TestErrorHierarchy:
class TestBackendContract:
def test_cannot_be_instantiated_without_implementing_everything(self):
with pytest.raises(TypeError):
- SandboxBackend() # type: ignore[abstract]
+ SandboxBackend()
def test_only_lifecycle_and_command_are_required(self):
# A new backend should have to write three methods, not six: the file
diff --git a/providers/common/ai/tests/unit/common/ai/sandbox/test_modal.py
b/providers/common/ai/tests/unit/common/ai/sandbox/test_modal.py
index 6987a8262f3..a423a1928a5 100644
--- a/providers/common/ai/tests/unit/common/ai/sandbox/test_modal.py
+++ b/providers/common/ai/tests/unit/common/ai/sandbox/test_modal.py
@@ -558,7 +558,7 @@ class TestEnvironment:
serialization where the message would not say which entry was wrong.
"""
with pytest.raises(SandboxTerminalError, match="strings"):
- backend.create(spec=SandboxSpec(env=env)) # type: ignore[arg-type]
+ backend.create(spec=SandboxSpec(env=env))
assert fake.Sandbox.created == [], "refused before anything was
provisioned"
diff --git a/providers/common/ai/tests/unit/common/ai/sandbox/test_sbx.py
b/providers/common/ai/tests/unit/common/ai/sandbox/test_sbx.py
index 9cc04b40e48..0e09c3d8c65 100644
--- a/providers/common/ai/tests/unit/common/ai/sandbox/test_sbx.py
+++ b/providers/common/ai/tests/unit/common/ai/sandbox/test_sbx.py
@@ -222,7 +222,7 @@ class TestCreate:
patch.object(backend, "_run_cli", autospec=True,
side_effect=fake_run_cli),
):
with pytest.raises(TypeError):
- backend.create(spec=SandboxSpec(env={"PORT": 8080},
block_network=True)) # type: ignore[dict-item]
+ backend.create(spec=SandboxSpec(env={"PORT": 8080},
block_network=True))
assert ["rm", "-f"] in [c[:2] for c in calls]
assert backend._workspaces == {}
diff --git a/providers/common/ai/tests/unit/common/ai/tools/test_strands.py
b/providers/common/ai/tests/unit/common/ai/tools/test_strands.py
index 2da97fb74aa..9bda221008e 100644
--- a/providers/common/ai/tests/unit/common/ai/tools/test_strands.py
+++ b/providers/common/ai/tests/unit/common/ai/tools/test_strands.py
@@ -104,7 +104,7 @@ def _run_through_checkpoints(agent: Agent, prompt: str) ->
AgentResult:
result = agent(prompt)
while result.checkpoint is not None:
# Strands types the prompt as AgentInput, which leaves out its
checkpointResume block.
- result = agent({"checkpointResume": {"checkpoint":
result.checkpoint.to_dict()}}) # type: ignore[arg-type]
+ result = agent({"checkpointResume": {"checkpoint":
result.checkpoint.to_dict()}})
return result
diff --git
a/providers/common/ai/tests/unit/common/ai/toolsets/test_managed_agent.py
b/providers/common/ai/tests/unit/common/ai/toolsets/test_managed_agent.py
index ef156869859..17af7800e9f 100644
--- a/providers/common/ai/tests/unit/common/ai/toolsets/test_managed_agent.py
+++ b/providers/common/ai/tests/unit/common/ai/toolsets/test_managed_agent.py
@@ -284,7 +284,7 @@ class TestManagedAgentToolset:
def test_something_that_is_not_a_client_is_refused_at_construction(self):
# Passing the hook instead of hook.agent(...) is the likely mistake;
it must not wait for the first call.
with pytest.raises(TypeError, match="Pass hook.agent"):
- ManagedAgentToolset(object(), tool_name="ask") # type:
ignore[arg-type]
+ ManagedAgentToolset(object(), tool_name="ask")
@pytest.mark.asyncio
async def test_vendor_options_travel_on_every_request(self):
diff --git
a/providers/common/compat/tests/unit/common/compat/test__retry_policy.py
b/providers/common/compat/tests/unit/common/compat/test__retry_policy.py
index 9a12238ca71..0d43b231ce8 100644
--- a/providers/common/compat/tests/unit/common/compat/test__retry_policy.py
+++ b/providers/common/compat/tests/unit/common/compat/test__retry_policy.py
@@ -128,11 +128,11 @@ class TestChainRetryPolicyBackport:
def test_a_single_policy_must_be_wrapped_in_a_sequence(self):
with pytest.raises(TypeError, match="wrap the single policy in a
list"):
- ChainRetryPolicy(self.floor) # type: ignore[arg-type]
+ ChainRetryPolicy(self.floor)
def test_members_must_be_retry_policies(self):
with pytest.raises(TypeError, match=r"policies\[1\] must be a
RetryPolicy, got str"):
- ChainRetryPolicy([self.floor, "rules"]) # type: ignore[list-item]
+ ChainRetryPolicy([self.floor, "rules"])
def test_accepts_any_sequence(self):
policy = ChainRetryPolicy((self.fail_403, self.floor))
diff --git a/providers/common/io/pyproject.toml
b/providers/common/io/pyproject.toml
index 7364fbf6f6a..e40ca8d76a6 100644
--- a/providers/common/io/pyproject.toml
+++ b/providers/common/io/pyproject.toml
@@ -59,7 +59,7 @@ requires-python = ">=3.11"
# After you modify the dependencies, and rebuild your Breeze CI image with
``breeze ci-image build``
dependencies = [
"apache-airflow>=2.11.0",
- "apache-airflow-providers-common-compat>=1.12.0",
+ "apache-airflow-providers-common-compat>=1.12.0", # use next version
]
# The optional dependencies should be modified in place in the generated file
diff --git
a/providers/common/io/tests/system/common/io/example_file_transfer_local_to_s3.py
b/providers/common/io/tests/system/common/io/example_file_transfer_local_to_s3.py
index 3276c57f80d..b79e37b5a40 100644
---
a/providers/common/io/tests/system/common/io/example_file_transfer_local_to_s3.py
+++
b/providers/common/io/tests/system/common/io/example_file_transfer_local_to_s3.py
@@ -34,7 +34,7 @@ try:
from airflow.sdk import TriggerRule
except ImportError:
# Compatibility for Airflow < 3.1
- from airflow.utils.trigger_rule import TriggerRule # type:
ignore[no-redef,attr-defined]
+ from airflow.utils.trigger_rule import TriggerRule # type:
ignore[no-redef]
from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS
diff --git a/providers/common/sql/pyproject.toml
b/providers/common/sql/pyproject.toml
index 95f005daee3..340839650ab 100644
--- a/providers/common/sql/pyproject.toml
+++ b/providers/common/sql/pyproject.toml
@@ -59,7 +59,7 @@ requires-python = ">=3.11"
# After you modify the dependencies, and rebuild your Breeze CI image with
``breeze ci-image build``
dependencies = [
"apache-airflow>=2.11.0",
- "apache-airflow-providers-common-compat>=1.14.1",
+ "apache-airflow-providers-common-compat>=1.14.1", # use next version
"sqlparse>=0.5.1",
"more-itertools>=9.0.0",
# The methodtools dependency is necessary since the introduction of
dialects:
diff --git
a/providers/common/sql/tests/unit/common/sql/operators/test_analytics.py
b/providers/common/sql/tests/unit/common/sql/operators/test_analytics.py
index c116a2ad63c..5f467800454 100644
--- a/providers/common/sql/tests/unit/common/sql/operators/test_analytics.py
+++ b/providers/common/sql/tests/unit/common/sql/operators/test_analytics.py
@@ -126,7 +126,7 @@ class TestAnalyticsOperator:
datasource_configs=[datasource_config],
queries=["SELECT * FROM users_data"],
engine=mock_engine,
- result_output_format=["invalid"], # type: ignore
+ result_output_format=["invalid"],
)
with pytest.raises(ValueError, match="Unsupported output format"):