-
Notifications
You must be signed in to change notification settings - Fork 890
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
pyproject.toml support #893
Conversation
yapf/yapflib/style.py
Outdated
@@ -17,6 +17,8 @@ | |||
import re | |||
import textwrap | |||
|
|||
import toml |
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.
[help wanted] I added external dependency because there's no toml loader in standard libraries. Is this OK?
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.
I'd prefer this to be seamless. So if someone doesn't have the toml
package installed, then we just skip this support all together. Is it possible to import the toml
conditionally and if it fails to import set a flag or something?
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.
@gwelymernans Hi! This PR is ready for review. |
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.
Sorry for the late review.
yapf/yapflib/style.py
Outdated
@@ -17,6 +17,8 @@ | |||
import re | |||
import textwrap | |||
|
|||
import toml |
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.
I'd prefer this to be seamless. So if someone doesn't have the toml
package installed, then we just skip this support all together. Is it possible to import the toml
conditionally and if it fails to import set a flag or something?
This PR is for #708
I added
pyproject.toml
support.Section syntax of
pyproject.toml
file is the same as @samypr100 's explanation in #708.Please let me know if I miss anything.
Thank you.