-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add CI for enforcing styles with Black and sorting imports #174
Comments
Will the GitHub action for autoblack be accepted as a possible fix for this issue? |
Does it include isort to sort the dependencies?
…On Thu, 30 Sep 2021, 23:01 Souhit Dey, ***@***.***> wrote:
Will the GitHub action for autoblack be accepted as a possible fix for
this issue?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#174 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL2O2QRXLLR7MXWFF2TAJKTUESNGHANCNFSM5E6YTR3A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
We can use one of the available isort actions for sorting the dependencies. For example this one: https://github.com/isort/isort-action |
Hello,
Sounds good. Can you write a custom CI method (using Tox maybe) that does
both?
Thanks and regards,
Akashdeep Dhar
***@***.***
***@***.***
…On Thu, Sep 30, 2021 at 11:18 PM Souhit Dey ***@***.***> wrote:
We can use one of the available isort actions for sorting the
dependencies. For example this one: https://github.com/isort/isort-action
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#174 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL2O2QV7X24YENEDKVFIQFDUESPHBANCNFSM5E6YTR3A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Made a PR with a custom GitHub workflow involving both isort and black as requested. Tested the same on my fork and it seems to be doing its job right, have a look and see if it works for your project :) Edit 1: There seems to be conflict between black and isort on coding style. Would be really helpful if you dropped your opinion on my PR based on the log I provided. Thanks in advance! |
See psf/black#333. Black doesn't have the feature to sort imports. Hence, you would want to format the code using Black first and then sort the imports. |
Thanks! |
Update: The issue persisted even after making black run before isort but adding that up with isort's |
Fixes Issue #174: Add CI for enforcing styles with Black and sorting imports
Add CI for enforcing styles with Black and sorting imports
The text was updated successfully, but these errors were encountered: