From ad62170e87b6ae6178b27c156b557abd05a2690d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 15 Jan 2024 10:01:47 +0200 Subject: [PATCH] make format --- Makefile | 5 ++++- app/e11sync/settings.py | 17 +++++++++-------- app/e11sync/urls.py | 6 +++--- flake.nix | 2 +- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index ecbd141..c050ef5 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,10 @@ test: nix flake check -# Dev. +.PHONY: format +format: + autopep8 -a -a --recursive --in-place --exclude app/signup/migrations app + .PHONY: run run: app/manage.py runserver diff --git a/app/e11sync/settings.py b/app/e11sync/settings.py index f3f046d..c8cd693 100644 --- a/app/e11sync/settings.py +++ b/app/e11sync/settings.py @@ -59,14 +59,15 @@ INSTALLED_APPS = (['debug_toolbar'] if DEBUG else []) + [ 'django.contrib.staticfiles', ] -MIDDLEWARE = (['debug_toolbar.middleware.DebugToolbarMiddleware'] if DEBUG else []) + [ - 'django.middleware.security.SecurityMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', +MIDDLEWARE = ( + ['debug_toolbar.middleware.DebugToolbarMiddleware'] if DEBUG else []) + [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'e11sync.urls' diff --git a/app/e11sync/urls.py b/app/e11sync/urls.py index 30d4255..0942f4f 100644 --- a/app/e11sync/urls.py +++ b/app/e11sync/urls.py @@ -21,8 +21,8 @@ from django.conf import settings urlpatterns = [ path('admin/', admin.site.urls), - ] + [ - path("__debug__/", include("debug_toolbar.urls")) - ] if settings.DEBUG else [] + [ +] + [ + path("__debug__/", include("debug_toolbar.urls")) +] if settings.DEBUG else [] + [ path('', include('signup.urls')), ] diff --git a/flake.nix b/flake.nix index 837423f..7f589bc 100644 --- a/flake.nix +++ b/flake.nix @@ -73,7 +73,7 @@ format = pkgs.runCommand "check-format" {} '' ${pkgs.python3Packages.flake8}/bin/flake8 \ --max-line-length 99 \ - --exclude ${./.}/app/signup/migrations/ ${./.} + --exclude ${./.}/app/signup/migrations/ ${./.}/app mkdir -p $out ''; };