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

Improve intersection of multi marker union #226

Conversation

radoering
Copy link
Member

@radoering radoering commented Nov 1, 2021

Resolves: python-poetry/poetry#4694

  • Added tests for changed code.
  • Updated documentation for changed code.

Improves the detection of empty markers when building the intersection of multi markers containing unions and single markers.

Therefore, if the list of markers of the intersection contains single markers and marker unions, the intersection of each marker union with each single marker is made. If the intersection is not a marker union but a single or empty marker, the resulting marker can be simplified.

I checked the new code for 100 % statement coverage. That is why the markers in the test cases may look a bit more complicated than in the examples in python-poetry/poetry#4694. (In order to test all paths it was necessary to use multi markers containing marker unions instead of just using marker unions.)

… of multi markers containing unions and single markers
@radoering radoering force-pushed the improve-intersection-of-multi-marker-union branch from 7f4b1a4 to 4bb77ab Compare November 21, 2021 06:20
@neersighted neersighted merged commit be85178 into python-poetry:master Jan 25, 2022
@radoering radoering mentioned this pull request Mar 13, 2022
2 tasks
@radoering radoering deleted the improve-intersection-of-multi-marker-union branch November 24, 2024 12:39
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.

[poetry-core] intersection of markers not recognized as empty
2 participants