Skip to content

fix(semver): restrict PEP 440 local version comparison to minimum length#352

Open
mramansayyad wants to merge 1 commit into
google:mainfrom
mramansayyad:fix/pep440-local-compare-bounds
Open

fix(semver): restrict PEP 440 local version comparison to minimum length#352
mramansayyad wants to merge 1 commit into
google:mainfrom
mramansayyad:fix/pep440-local-compare-bounds

Conversation

@mramansayyad

Copy link
Copy Markdown

This PR fixes a minor logic issue in the PEP 440 local version comparison function where the loop counter compared up to the length of the first version string (pn) rather than the minimum of both version strings (n). This could lead to calling pep440LocalElem on an empty string and unnecessary iterations. Using n avoids this and compares only up to the shared components length.

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.

1 participant