Skip to content

Remove more code#430

Merged
Secrus merged 3 commits intopython-poetry:mainfrom
dimbleby:remove-more-code
Aug 22, 2022
Merged

Remove more code#430
Secrus merged 3 commits intopython-poetry:mainfrom
dimbleby:remove-more-code

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.

@sonarqubecloud
Copy link

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 <b.sokorski@gmail.com>
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