Skip to content

Commit 76bec04

Browse files
committed
style: apply ruff format and drop dead mypy override
CI reported 11 files failing ``ruff format --check`` — mostly blank lines inside multi-line import blocks left over from the earlier hoist / pane split. Running ``ruff format .`` normalizes them. Also drop the ``sphinx_autodoc_fastmcp`` entry from the mypy override block in pyproject.toml. Nothing in src/, tests/, or docs/ imports it (it appears only as a string in ``conf.py::extensions``), so the override was dead config. Mypy was flagging it on every run. The docutils entry stays since mypy still lists it as used when checking the full tree.
1 parent 447bfd5 commit 76bec04

File tree

12 files changed

+4
-42
lines changed

12 files changed

+4
-42
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ files = [
117117
]
118118

119119
[[tool.mypy.overrides]]
120-
module = ["sphinx_autodoc_fastmcp", "sphinx_autodoc_fastmcp.*", "docutils", "docutils.*"]
120+
module = ["docutils", "docutils.*"]
121121
ignore_missing_imports = true
122122

123123
[tool.coverage.run]

src/libtmux_mcp/_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,7 @@ def handle_tool_errors(
604604
Catches libtmux exceptions and re-raises as ``ToolError`` so that
605605
MCP responses have ``isError=True`` with a descriptive message.
606606
"""
607+
607608
@functools.wraps(fn)
608609
def wrapper(*args: P.args, **kwargs: P.kwargs) -> R:
609610
try:

src/libtmux_mcp/middleware.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,7 @@ async def on_call_tool(
202202

203203
duration_ms = (time.monotonic() - start) * 1000.0
204204
self._logger.info(
205-
"tool=%s outcome=ok duration_ms=%.2f "
206-
"client_id=%s request_id=%s args=%s",
205+
"tool=%s outcome=ok duration_ms=%.2f client_id=%s request_id=%s args=%s",
207206
tool_name,
208207
duration_ms,
209208
client_id,

src/libtmux_mcp/tools/pane_tools/copy_mode.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ def enter_copy_mode(
6868
return _serialize_pane(pane)
6969

7070

71-
72-
7371
@handle_tool_errors
7472
def exit_copy_mode(
7573
pane_id: str | None = None,
@@ -112,5 +110,3 @@ def exit_copy_mode(
112110
pane.cmd("send-keys", "-t", pane.pane_id, "-X", "cancel")
113111
pane.refresh()
114112
return _serialize_pane(pane)
115-
116-

src/libtmux_mcp/tools/pane_tools/io.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ def send_keys(
7777
return f"Keys sent to pane {pane.pane_id}"
7878

7979

80-
81-
8280
@handle_tool_errors
8381
def capture_pane(
8482
pane_id: str | None = None,
@@ -129,8 +127,6 @@ def capture_pane(
129127
return "\n".join(lines)
130128

131129

132-
133-
134130
@handle_tool_errors
135131
def clear_pane(
136132
pane_id: str | None = None,
@@ -179,8 +175,6 @@ def clear_pane(
179175
return f"Pane cleared: {pane.pane_id}"
180176

181177

182-
183-
184178
@handle_tool_errors
185179
def paste_text(
186180
text: str,
@@ -278,5 +272,3 @@ def paste_text(
278272
server.cmd("delete-buffer", "-b", buffer_name)
279273

280274
return f"Text pasted to pane {pane.pane_id}"
281-
282-

src/libtmux_mcp/tools/pane_tools/layout.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ def resize_pane(
8282
return _serialize_pane(pane)
8383

8484

85-
86-
8785
@handle_tool_errors
8886
def select_pane(
8987
pane_id: str | None = None,
@@ -190,8 +188,6 @@ def select_pane(
190188
return _serialize_pane(active_pane)
191189

192190

193-
194-
195191
@handle_tool_errors
196192
def swap_pane(
197193
source_pane_id: str,
@@ -225,5 +221,3 @@ def swap_pane(
225221
server.cmd("swap-pane", "-s", source_pane_id, "-t", target_pane_id)
226222
source.refresh()
227223
return _serialize_pane(source)
228-
229-

src/libtmux_mcp/tools/pane_tools/lifecycle.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ def kill_pane(
5858
return f"Pane killed: {pid}"
5959

6060

61-
62-
6361
@handle_tool_errors
6462
def set_pane_title(
6563
title: str,
@@ -105,8 +103,6 @@ def set_pane_title(
105103
return _serialize_pane(pane)
106104

107105

108-
109-
110106
@handle_tool_errors
111107
def get_pane_info(
112108
pane_id: str | None = None,
@@ -147,5 +143,3 @@ def get_pane_info(
147143
window_id=window_id,
148144
)
149145
return _serialize_pane(pane)
150-
151-

src/libtmux_mcp/tools/pane_tools/meta.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ def display_message(
6060
return "\n".join(result.stdout) if result.stdout else ""
6161

6262

63-
64-
6563
@handle_tool_errors
6664
def snapshot_pane(
6765
pane_id: str | None = None,
@@ -159,5 +157,3 @@ def snapshot_pane(
159157
pane_current_path=parts[10] if parts[10] else None,
160158
is_caller=(pane.pane_id == caller_pane_id if caller_pane_id else None),
161159
)
162-
163-

src/libtmux_mcp/tools/pane_tools/pipe.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,3 @@ def pipe_pane(
8181
redirect = ">>" if append else ">"
8282
pane.cmd("pipe-pane", f"cat {redirect} {shlex.quote(output_path)}")
8383
return f"Piping pane {pane.pane_id} to {output_path}"
84-
85-

src/libtmux_mcp/tools/pane_tools/search.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,3 @@ def search_panes(
146146

147147
matches.sort(key=lambda m: m.pane_id)
148148
return matches
149-
150-

0 commit comments

Comments
 (0)