-
Notifications
You must be signed in to change notification settings - Fork 5.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
Migrate to Black #3846
Comments
Maybe we could also consider adding isort/db-migration/graphql-schema/ts-types checks in pre-commit. We may need following part in Pipfile since black still doesn't have a stable release.
|
For now, I would rather only one tool and if it works for us, reconsider adding automating more in the future. |
Also, there should be proper tests launched on CI. Re isort - I like this tool, but sometimes I've got problems when using with black. And |
@jxltom thanks for code review! 💪 Do we embrace 88? |
Update: We are waiting for version 1.0 - ATM black is preparing new version which will for sure affect our codebase. To Avoid making massive formatting twice, we will wait. Related tweet: https://twitter.com/llanga/status/1106247623802060802 |
About Unless there is a better solution (like a GH bot or something, that could generate rapports). |
Note that we also need to update the docs accordingly. |
Merged #3852. A new era has begun 😄 |
Currently, in Saleor we use Yapf code formatter for Python. The problem is that we've never actually formatted the whole codebase with it which results in mixed code styles across the project. Another problem is that we don't have any automatic formatting enabled so we cannot enforce a unified style in PRs from the community.
We could stick to Yapf, but in the meantime, a new tool appeared - Black - and it's becoming adopted by many other Python projects. A few teams also use it at Mirumee and they recommend it. After internal discussion, we decided to migrate to Black in Saleor as well. This change will affect every open PR and will probably cause a lot of merge conflicts for those how regularly update Saleor, but this step is necessary to improve the readability and consistency of Saleor's codebase.
What needs to be done:
black
to dev requirementsThe text was updated successfully, but these errors were encountered: