This repository has been archived by the owner on Aug 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 677
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Black to format Python code (#6447)
* Format Python code with Black * Update .flake8 for Black * Address most flake8 issues * Fix flake8 E231: missing whitespace after ',' Should be removed by Black, but currently buggy. See: psf/black#1202 * Re-run Black * One final black/flake8 fix * Fail CI if Black does not pass
- Loading branch information
Showing
365 changed files
with
31,126 additions
and
21,259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
[flake8] | ||
exclude = **/migrations/**,.tox,*.egg,vendor | ||
# E501 - line too long (82 > 79 characters) | ||
# E731 - do not assign a lambda expression, use a def | ||
# F405 - name may be undefined, or defined from star imports: module | ||
# W504 - line break after binary operator | ||
# conflicts with W503 (line break before binary operator) | ||
ignore = E501,E731,F405,W504 | ||
exclude = **/migrations/** | ||
|
||
# Black recommends 88-char lines and ignoring the following lints: | ||
# - E203 - whitespace before ':' | ||
# - E501 - line too long | ||
# - W503 - line break before binary operator | ||
max-line-length=88 | ||
ignore = E203, E501, W503 | ||
|
||
# Allow star imports in config files: | ||
per-file-ignores = | ||
kuma/settings/local.py:F403,F405 | ||
kuma/settings/prod.py:F403,F405 | ||
kuma/settings/testing.py:F403,F405 | ||
|
||
# flake8-import-order settings | ||
import-order-style=edited | ||
application-import-names=kuma,pages,utils | ||
application-import-names=kuma,pages,utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
|
||
|
||
# This will make sure the app is always imported when | ||
# Django starts so that shared_task will use this app. | ||
from .celery import app as celery_app | ||
|
||
__all__ = ('celery_app',) | ||
__all__ = ("celery_app",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.