Skip to content

constraints: make EmptyConstraint hashable and tidy up a bit#513

Merged
neersighted merged 1 commit intopython-poetry:mainfrom
radoering:hash-constraints
Oct 30, 2022
Merged

constraints: make EmptyConstraint hashable and tidy up a bit#513
neersighted merged 1 commit intopython-poetry:mainfrom
radoering:hash-constraints

Conversation

@radoering
Copy link
Copy Markdown
Member

follow up of #466 which handled generic constraints, this one handles version constraints

@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.7% 0.7% Duplication

Copy link
Copy Markdown
Member

@neersighted neersighted left a comment

Choose a reason for hiding this comment

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

LGTM overall; however I'm not a huge fan of BaseConstaint, that's neither here nor there for this PR. How painful would it be to refactor it into an ABC in the future?

@neersighted neersighted merged commit 3905d3e into python-poetry:main Oct 30, 2022
@radoering
Copy link
Copy Markdown
Member Author

How painful would it be to refactor it into an ABC in the future?

It's a bit of work (at least if we want to do it properly) because not all (concrete) sub classes implement all methods that raise NotImplementedError in BaseConstraint. I took the first step with intersection and union: #515

@radoering radoering deleted the hash-constraints branch November 24, 2024 12:40
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.

2 participants