-
Notifications
You must be signed in to change notification settings - Fork 255
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 populate python constraints from markers #261
fix populate python constraints from markers #261
Conversation
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
@@ -366,6 +367,10 @@ def create_dependency( | |||
) | |||
else: | |||
marker = parse_marker(markers) | |||
# possibility that python constraint appears in markers, not keywords | |||
if not python_versions and markers: |
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.
markers
is known truth-y here, isn't it, making this check redundant?
@@ -366,6 +367,10 @@ def create_dependency( | |||
) | |||
else: | |||
marker = parse_marker(markers) | |||
# possibility that python constraint appears in markers, not keywords | |||
if not python_versions and markers: | |||
python_versions_marker = get_python_constraint_from_marker(marker) |
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.
why not just python_versions = get_python_constraint_from_marker(marker)
?
# possibility that python constraint appears in markers, not keywords | ||
if not python_versions and markers: | ||
python_versions_marker = get_python_constraint_from_marker(marker) | ||
python_versions = python_versions_marker |
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.
The result of this parse is never used, is it?
The test that you have added passes without the fix, which is consistent with this not doing anything.
Can you add a test that fails before the fix, and passes after it?
Resolves: python-poetry#