Skip to content

Commit

Permalink
use correct capitalization of file paths to work around python/mypy#1…
Browse files Browse the repository at this point in the history
…8590 (#342)

Co-authored-by: detachhead <detachhead@users.noreply.github.com>
  • Loading branch information
DetachHead and DetachHead authored Feb 6, 2025
1 parent ff08420 commit 20c6af4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bundled/tool/lsp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,9 @@ def _run_tool_on_document(
argv += _get_dmypy_args(settings, "run")
argv += TOOL_ARGS + settings["args"] + extra_args
if settings["reportingScope"] == "file":
argv += [document.path]
# pygls normalizes the path to lowercase on windows, but we need to resolve the
# correct capitalization to avoid https://github.com/python/mypy/issues/18590#issuecomment-2630249041
argv += [str(pathlib.Path(document.path).resolve())]
else:
argv += [cwd]

Expand Down

0 comments on commit 20c6af4

Please sign in to comment.