diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 0e44d5ff402..c711f98f5d6 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.5.3
+    rev: v0.5.4
     hooks:
       - id: ruff
         args:
diff --git a/requirements_test_pre_commit.txt b/requirements_test_pre_commit.txt
index 3c4da0141cd..f7c7a18f3f3 100644
--- a/requirements_test_pre_commit.txt
+++ b/requirements_test_pre_commit.txt
@@ -1,5 +1,5 @@
 # Automatically generated from .pre-commit-config.yaml by gen_requirements_all.py, do not edit
 
 codespell==2.3.0
-ruff==0.5.3
+ruff==0.5.4
 yamllint==1.35.1