Skip to content

Commit

Permalink
Use black formatter
Browse files Browse the repository at this point in the history
- Adjust isort/flake8 configuration
- Format everything using black
- Add auto formatting to pre-commit hook
  • Loading branch information
Uxio0 committed Oct 14, 2021
1 parent b0de925 commit b26efe5
Show file tree
Hide file tree
Showing 214 changed files with 40,627 additions and 10,797 deletions.
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ repos:
rev: 5.9.3
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 21.9b0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v4.0.1
hooks:
- id: check-docstring-first
- id: check-merge-conflict
Expand Down
6 changes: 3 additions & 3 deletions config/celery_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ def on_celery_setup_logging(**kwargs):
# Patch all the code to use Celery logger (if not just logs inside tasks.py are displayed with the
# task_id and task_name). This way every log will have the context information
if not settings.CELERY_ALWAYS_EAGER:
for _, logger in settings.LOGGING['loggers'].items():
key = 'handlers'
for _, logger in settings.LOGGING["loggers"].items():
key = "handlers"
if key in logger:
logger[key] = ['celery_console']
logger[key] = ["celery_console"]
dictConfig(settings.LOGGING)


Expand Down
Loading

0 comments on commit b26efe5

Please sign in to comment.