diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 52b43378..1a936bbf 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -57,7 +57,7 @@ repos:
 
   # Python linting and formatting using ruff
   - repo: https://github.com/astral-sh/ruff-pre-commit
-    rev: v0.9.2
+    rev: v0.9.3
     hooks:
       - id: ruff
         args: ["--fix", "--show-fixes"]
diff --git a/src/mqt/qcec/compilation_flow_profiles.py b/src/mqt/qcec/compilation_flow_profiles.py
index 03e401f3..911f552c 100644
--- a/src/mqt/qcec/compilation_flow_profiles.py
+++ b/src/mqt/qcec/compilation_flow_profiles.py
@@ -301,8 +301,7 @@ def write_profile_data_to_file(profile_data: dict[tuple[str, int], int], filenam
     """Write the profile data to a file."""
     with Path(filename).open("w+", encoding="utf-8") as f:
         f.write(f"# {filename}, Qiskit version: {qiskit_version}\n")
-        for (gate, controls), cost in profile_data.items():
-            f.write(f"{gate} {controls} {cost}\n")
+        f.writelines(f"{gate} {controls} {cost}\n" for (gate, controls), cost in profile_data.items())
 
 
 def check_recurrence(seq: list[int], order: int = 2) -> list[int] | None: