-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
poetry init uses existing pyproject.toml if possible #2448
poetry init uses existing pyproject.toml if possible #2448
Conversation
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.
Minor changes. Would be good to add test coverage for this.
Instead of simply raising an error when a different I recently ran into this when converting a project from setuptools to Poetry. In this case, I already had a |
@finswimmer can we rebase this please? |
32b9bb9
to
3f363da
Compare
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.
Looks good. We should add test coverage for this.
3f363da
to
9cad9fb
Compare
@finswimmer here is an example for the init command test cases: abn@e378a88 |
9cad9fb
to
50e68b6
Compare
@finswimmer rebase please. |
e5846e3
to
3f5bb7d
Compare
I'v expected this @abn :) Is done. |
@tarkatronic I thinnk that should be a new feature request as the scope of that is a bit larger than what is changed here. |
That is totally reasonable. 😄 |
…em section. If not prepend data on init.
3f5bb7d
to
45dcc24
Compare
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.
Looking good, minor changes.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
At the moment a
poetry init
will fail, if apyproject.toml
already exists.As this file is becoming more and more widely used to store configuration for other tools like
black
andisort
, this PR changes the behavior to only skip creating the content forpyproject.toml
if the file already contains atool.poetry
section or abuild-system
section.closes: #1639