Lessen dmypy suggest path limitations for Windows machines #19337
+8
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this pull request, we allow dmypy suggest absolute paths to contain the drive letter colon for Windows machines. Fixes #19335.
This is done by changing how
find_node
works slightly, allowing there to be at most two colon (:
) characters in the passed key for windows machines instead of just one like on all other platforms, and then usingrsplit
and a split limit of 1 instead of justsplit
like prior.I was looking at the existing tests for dmypy suggest and noticed nothing is testing absolute paths for any platform, so I am unsure what I need to do to add tests; This sounds like maybe it could require changes to the test framework system, and I'd like feedback from others before trying to do that.