lean-lsp-mcp 0.12.0__py3-none-any.whl → 0.12.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
lean_lsp_mcp/server.py CHANGED
@@ -280,8 +280,8 @@ def diagnostic_messages(
280
280
 
281
281
  Args:
282
282
  file_path (str): Abs path to Lean file
283
- start_line (int, optional): Start line (1-indexed) for filtering diagnostics. If provided, only diagnostics from this line onwards are returned.
284
- end_line (int, optional): End line (1-indexed) for filtering diagnostics. If provided with start_line, only diagnostics in this range are returned.
283
+ start_line (int, optional): Start line (1-indexed). Filters from this line.
284
+ end_line (int, optional): End line (1-indexed). Filters to this line.
285
285
 
286
286
  Returns:
287
287
  List[str] | str: Diagnostic msgs or error msg
@@ -292,19 +292,16 @@ def diagnostic_messages(
292
292
 
293
293
  client: LeanLSPClient = ctx.request_context.lifespan_context.client
294
294
 
295
- # leanclient requires both start_line and end_line to filter
296
295
  # Convert 1-indexed to 0-indexed for leanclient
297
- if start_line is not None or end_line is not None:
298
- start_line_0 = (start_line - 1) if start_line is not None else 0
299
- end_line_0 = (end_line - 1) if end_line is not None else 999999
300
- diagnostics = client.get_diagnostics(
301
- rel_path,
302
- start_line=start_line_0,
303
- end_line=end_line_0,
304
- inactivity_timeout=10.0,
305
- )
306
- else:
307
- diagnostics = client.get_diagnostics(rel_path, inactivity_timeout=10.0)
296
+ start_line_0 = (start_line - 1) if start_line is not None else None
297
+ end_line_0 = (end_line - 1) if end_line is not None else None
298
+
299
+ diagnostics = client.get_diagnostics(
300
+ rel_path,
301
+ start_line=start_line_0,
302
+ end_line=end_line_0,
303
+ inactivity_timeout=8.0,
304
+ )
308
305
 
309
306
  return format_diagnostics(diagnostics)
310
307
 
@@ -660,7 +657,9 @@ def run_code(ctx: Context, code: str) -> List[str] | str:
660
657
  assert client is not None # startup_client guarantees an initialized client
661
658
  client.open_file(rel_path)
662
659
  opened_file = True
663
- diagnostics = format_diagnostics(client.get_diagnostics(rel_path))
660
+ diagnostics = format_diagnostics(
661
+ client.get_diagnostics(rel_path, inactivity_timeout=8.0)
662
+ )
664
663
  finally:
665
664
  if opened_file:
666
665
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lean-lsp-mcp
3
- Version: 0.12.0
3
+ Version: 0.12.1
4
4
  Summary: Lean Theorem Prover MCP
5
5
  Author-email: Oliver Dressler <hey@oli.show>
6
6
  License-Expression: MIT
@@ -8,7 +8,7 @@ Project-URL: Repository, https://github.com/oOo0oOo/lean-lsp-mcp
8
8
  Requires-Python: >=3.10
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
- Requires-Dist: leanclient==0.5.0
11
+ Requires-Dist: leanclient==0.5.1
12
12
  Requires-Dist: mcp[cli]==1.21.0
13
13
  Requires-Dist: orjson>=3.11.1
14
14
  Provides-Extra: lint
@@ -4,11 +4,11 @@ lean_lsp_mcp/client_utils.py,sha256=hF941DEeRE3ICMgMhv9J4vv6bO4hZPJOAcFU03yIDXs,
4
4
  lean_lsp_mcp/file_utils.py,sha256=kCTYQSfmV-R2cm_NCi_L8W5Dcsm0_rTOPpTtpyAin78,1365
5
5
  lean_lsp_mcp/instructions.py,sha256=y_gHlbeJoKnPohmcSVrQQds6mbBO1en-lxnXAfEypZE,892
6
6
  lean_lsp_mcp/search_utils.py,sha256=X2LPynDNLi767UDxbxHpMccOkbnfKJKv_HxvRNxIXM4,3984
7
- lean_lsp_mcp/server.py,sha256=oxuytxr58QLS-lCVRxYgtlLGEW0uHPhw2gKC5oRChqk,35799
7
+ lean_lsp_mcp/server.py,sha256=AiPu6yw_m1wQdooXyhgKUGuL-Kmin4GNoz79iZNnTps,35457
8
8
  lean_lsp_mcp/utils.py,sha256=zLu2VIhaX4yocY07F3Z94LB2jRGrkH1ID9SjR3poE9A,8255
9
- lean_lsp_mcp-0.12.0.dist-info/licenses/LICENSE,sha256=CQlxnf0tQyoVrBE93JYvAUYxv6Z5Yg6sX0pwogOkFvo,1071
10
- lean_lsp_mcp-0.12.0.dist-info/METADATA,sha256=wMGQwNNQxVIt_hxZZgOZDIJ1E5wQmq2h4x9hRJrBgjw,19626
11
- lean_lsp_mcp-0.12.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
- lean_lsp_mcp-0.12.0.dist-info/entry_points.txt,sha256=nQbvwctWkWD7I-2f4VrdVQBZYGUw8CnUnFC6QjXxOSE,51
13
- lean_lsp_mcp-0.12.0.dist-info/top_level.txt,sha256=LGEK0lgMSNPIQ6mG8EO-adaZEGPi_0daDs004epOTF0,13
14
- lean_lsp_mcp-0.12.0.dist-info/RECORD,,
9
+ lean_lsp_mcp-0.12.1.dist-info/licenses/LICENSE,sha256=CQlxnf0tQyoVrBE93JYvAUYxv6Z5Yg6sX0pwogOkFvo,1071
10
+ lean_lsp_mcp-0.12.1.dist-info/METADATA,sha256=fwr43eEL0JDzu2wv9JJPoInsJyRL1dlGcz8RUhpPXs8,19626
11
+ lean_lsp_mcp-0.12.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
+ lean_lsp_mcp-0.12.1.dist-info/entry_points.txt,sha256=nQbvwctWkWD7I-2f4VrdVQBZYGUw8CnUnFC6QjXxOSE,51
13
+ lean_lsp_mcp-0.12.1.dist-info/top_level.txt,sha256=LGEK0lgMSNPIQ6mG8EO-adaZEGPi_0daDs004epOTF0,13
14
+ lean_lsp_mcp-0.12.1.dist-info/RECORD,,