-
Notifications
You must be signed in to change notification settings - Fork 256
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 reduce_by_python_constraint
#824
fix reduce_by_python_constraint
#824
Conversation
This fixes a bug that caused incorrect markers to be written into the lock file. See poetry-plugin-export#319.
Reviewer's Guide by SourceryThis pull request fixes a bug in the Sequence diagram for reduce_by_python_constraint marker handlingsequenceDiagram
participant M as Marker
participant R as reduce_by_python_constraint
participant U as Utils
M->>R: reduce_by_python_constraint(python_constraint)
alt python version marker
R->>U: get_python_constraint_from_marker(marker)
U-->>R: constraint
alt constraint allows all python_constraint
R-->>M: AnyMarker()
else constraint allows none of python_constraint
R-->>M: EmptyMarker()
else
R-->>M: original marker
end
else
R-->>M: original marker
end
Class diagram for marker handlingclassDiagram
class BaseMarker {
+reduce_by_python_constraint(python_constraint: VersionConstraint)
}
class SingleMarker {
-name: str
-constraint: VersionConstraint
+reduce_by_python_constraint(python_constraint: VersionConstraint)
}
class MultiMarker {
-markers: List[BaseMarker]
+reduce_by_python_constraint(python_constraint: VersionConstraint)
}
class AnyMarker {
}
class EmptyMarker {
}
BaseMarker <|-- SingleMarker
BaseMarker <|-- MultiMarker
BaseMarker <|-- AnyMarker
BaseMarker <|-- EmptyMarker
note for SingleMarker "Fixed to use get_python_constraint_from_marker"
note for MultiMarker "Updated to handle VersionRange"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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 @radoering - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please add documentation describing the fix and expected behavior for Python version constraint handling in markers. This will help users understand how version constraints are processed, especially since this fixes a bug in lock file generation.
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.
This fixes a bug that caused incorrect markers to be written into the lock file. See python-poetry/poetry-plugin-export#319.
Looks like I forgot that
python_marker
is special so that you cannot just use its constraint...Summary by Sourcery
Bug Fixes: