Skip to content

fix: use dots for Windows path separators in fullyQualifiedName - #112

Merged
jimisola merged 1 commit into
mainfrom
fix/windows-fully-qualified-name
Nov 23, 2026
Merged

jimisola merged 1 commit into
mainfrom
fix/windows-fully-qualified-name

Conversation

@jimisola

@jimisola jimisola commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Requested by Jimisola · project thread

Fixes #111.

What & Why

fullyQualifiedName was built with str(file_path).replace("/", "."). On Windows, paths from os.walk/os.path.join use backslashes, so nothing was replaced and annotations.yml held names like src\pkg\mod.func, which reqstool-client can't match to code. Now the path goes through PurePath(...).as_posix() first; behaviour on POSIX is unchanged.

Test plan

  • New test passes a PureWindowsPath("src\\pkg\\mod.py") (works on any host) and expects src.pkg.mod.my_func. It fails without the fix.
  • hatch run dev:pytest tests/unit: 38 passed; black and flake8 clean
  • Not run on a real Windows runner: this repo has no Windows CI

🤖 Generated with Claude Code

https://claude.ai/code/session_01Mt2FAXZTXnbKG2Ho6GYy1z

os.walk and os.path.join yield backslash paths on Windows, which the
replace of '/' left untouched, so annotations.yml named elements like
src\pkg\mod.func. Normalise with PurePath.as_posix() first.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mt2FAVc4k9yNuEdkfxHdQX
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
@jimisola jimisola self-assigned this Nov 22, 2026
@jimisola
jimisola marked this pull request as ready for review November 22, 2026 08:36
@jimisola
jimisola merged commit 385a728 into main Nov 23, 2026
13 checks passed
@jimisola
jimisola deleted the fix/windows-fully-qualified-name branch November 23, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: fullyQualifiedName is wrong for Windows paths (backslashes not converted)

1 participant