Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use matches rather than contains in requirements.txt parsing #10423

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

charliermarsh
Copy link
Member

No description provided.

@charliermarsh charliermarsh added the performance Potential performance improvement label Jan 9, 2025
@charliermarsh charliermarsh marked this pull request as ready for review January 9, 2025 02:19
@charliermarsh charliermarsh enabled auto-merge (squash) January 9, 2025 02:24
@charliermarsh charliermarsh merged commit 15ec830 into main Jan 9, 2025
63 checks passed
@charliermarsh charliermarsh deleted the charlie/x branch January 9, 2025 02:32
@@ -416,6 +416,11 @@ impl RequirementsTxt {
}
}

/// Returns `true` if the character is a newline or a comment character.
const fn is_terminal(c: char) -> bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw terminal is overloaded for grammars: https://en.wikipedia.org/wiki/Terminal_and_nonterminal_symbols

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Potential performance improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants