-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix(add): do not pass @latest to parser #10069
Conversation
Reviewer's Guide by SourceryThis pull request addresses the issue of passing the '@latest' descriptor to the core requirement parser by stripping it from the requirement strings before parsing. A new test was added to ensure this behavior is correctly implemented. Sequence diagram for requirement parsing without @latestsequenceDiagram
participant User
participant AddCommand
participant Parser
User->>AddCommand: Add dependency
AddCommand->>AddCommand: _parse_requirements()
Note over AddCommand: Strip @latest descriptor
AddCommand->>Parser: parse(cleaned_requirement)
Parser-->>AddCommand: Parsed requirement
AddCommand-->>User: Dependency added
Flow diagram for requirement string processingflowchart LR
A[Raw Requirement] -->|Input| B[Strip @latest]
B -->|Regular Expression| C[Clean Requirement]
C -->|Parse| D[Parsed Requirement]
style A fill:#f9f,stroke:#333,stroke-width:2px
style D fill:#9f9,stroke:#333,stroke-width:2px
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
8a6b461
to
6fda3ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @abn - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
6fda3ae
to
42dcea9
Compare
We should not pass in front-end specific `@latest` descriptor to the core requirement parser. Relates-to: python-poetry#10068
42dcea9
to
04b2afb
Compare
We should not pass in front-end specific
@latest
descriptor to the core requirement parser.Relates-to: #10068
Summary by Sourcery
Strip out the '@latest' descriptor from requirements before parsing to prevent passing front-end specific descriptors to the core parser, and add a test to verify this behavior.
Bug Fixes:
Tests: