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

Remove more code #430

Merged
merged 3 commits into from
Aug 22, 2022
Merged

Remove more code #430

merged 3 commits into from
Aug 22, 2022

Conversation

dimbleby
Copy link
Contributor

@dimbleby dimbleby commented Jul 25, 2022

At some point in python-poetry/poetry#6058, it wasn't clear to me whether I should be writing dependency.accepts(package) or package.satisfies(dependency).

It turns out that there are no callers of Dependency.accepts(), so I chose Package.satisfies().

So as to save future developers the confusion, let's remove Dependency.accepts().

Then in passing I noticed VcsDependency.accepts_prereleases() which is also unused. That smells like it was a confusion at some point with allows_prereleases(), which is a method implemented on the Dependency. Let's remove that too.

@sonarcloud
Copy link

sonarcloud bot commented Aug 22, 2022

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 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@Secrus Secrus merged commit ba54386 into python-poetry:main Aug 22, 2022
@dimbleby dimbleby deleted the remove-more-code branch August 22, 2022 07:46
bostonrwalker pushed a commit to bostonrwalker/poetry-core that referenced this pull request Aug 29, 2022
* remove unused accepts_prereleases()

* remove Dependency.accepts()

Co-authored-by: Bartosz Sokorski <[email protected]>
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