diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 5a7dca7e..b1f9a552 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,6 +1,6 @@
 repos:
 - repo: https://github.com/astral-sh/ruff-pre-commit
-  rev: "v0.9.4"
+  rev: "v0.9.7"
   hooks:
     - id: ruff
       args: ["--fix"]
@@ -43,7 +43,7 @@ repos:
         language: python
         additional_dependencies: [pygments, restructuredtext_lint]
 -   repo: https://github.com/pre-commit/mirrors-mypy
-    rev: v1.14.1
+    rev: v1.15.0
     hooks:
     -   id: mypy
         files: ^(src/|testing/)
diff --git a/src/pluggy/_callers.py b/src/pluggy/_callers.py
index 3cbf9b88..f88b92e0 100644
--- a/src/pluggy/_callers.py
+++ b/src/pluggy/_callers.py
@@ -32,7 +32,7 @@ def _raise_wrapfail(
     ),
     msg: str,
 ) -> NoReturn:
-    co = wrap_controller.gi_code
+    co = wrap_controller.gi_code  # type: ignore[union-attr]
     raise RuntimeError(
         f"wrap_controller at {co.co_name!r} {co.co_filename}:{co.co_firstlineno} {msg}"
     )