Merged
Conversation
1253be8 to
542a39c
Compare
awelzel
reviewed
Mar 13, 2026
| def make_absolute_path(path: str) -> str: | ||
| """Ensures that a given path starts with os.sep.""" | ||
| if not path.startswith(os.sep): | ||
| return os.sep + path |
Contributor
There was a problem hiding this comment.
os.sep isn't correct for URLs. Probably want a literal / for those that want to use this tool on Windows.
Member
Author
There was a problem hiding this comment.
Thanks, true. If people use this on Windows they are likely going to have more problems though, since the scan command (from which this function gets invoked) operates in the file system world. I tried to stick to pathlib but don't know what these paths will end up looking like on Windows.
A good way to handle this is to ensure that the Redirect class URL-ifies its inputs properly. I'll table that for now, though, but let me put a note in the code.
RTD uses absolute paths (on top of the language/version prefix) for its path redirects, so it's easier to work with our inferred ones if they follow that pattern.
… dir This simplifies running the scan command without needing to think about --zeekroot.
542a39c to
f3190cc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
These make it easier to use
doc-redirects scanand its output.