From b09e1b556b38f85bf41d41fe587ba98ec033160a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Krop=C3=A1=C4=8Dek?= Date: Mon, 3 Mar 2025 21:56:04 +0100 Subject: [PATCH] reformat --- .pre-commit-config.yaml | 1 + facturio/asgi.py | 8 -------- facturio/settings/base.py | 11 ----------- facturio/wsgi.py | 8 -------- invoices/models.py | 5 ++++- invoices/tasks.py | 3 ++- manage.py | 1 - 7 files changed, 7 insertions(+), 30 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c1a391c..edb967d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,3 +21,4 @@ repos: hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] + - id: ruff-format diff --git a/facturio/asgi.py b/facturio/asgi.py index 21ef554..20f8066 100644 --- a/facturio/asgi.py +++ b/facturio/asgi.py @@ -1,11 +1,3 @@ -""" -ASGI config for facturio project. - -It exposes the ASGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ -""" import os from django.core.asgi import get_asgi_application diff --git a/facturio/settings/base.py b/facturio/settings/base.py index 026ba25..2e4309d 100644 --- a/facturio/settings/base.py +++ b/facturio/settings/base.py @@ -1,14 +1,3 @@ -""" -Django settings for facturio project. - -Generated by 'django-admin startproject' using Django 5.0. - -For more information on this file, see -https://docs.djangoproject.com/en/5.0/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/5.0/ref/settings/ -""" from pathlib import Path from django.utils.translation import gettext_lazy as _ diff --git a/facturio/wsgi.py b/facturio/wsgi.py index 84b1ae0..9b73de3 100644 --- a/facturio/wsgi.py +++ b/facturio/wsgi.py @@ -1,11 +1,3 @@ -""" -WSGI config for facturio project. - -It exposes the WSGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ -""" import os from django.core.wsgi import get_wsgi_application diff --git a/invoices/models.py b/invoices/models.py index 319bc20..663d6f6 100644 --- a/invoices/models.py +++ b/invoices/models.py @@ -90,7 +90,10 @@ class InvoiceFile(models.Model): invoice = models.ForeignKey(Invoice, on_delete=models.CASCADE, related_name='files') file = models.FileField( - _('File'), upload_to='invoice-files/%Y/%m/%d/', null=True, blank=True, + _('File'), + upload_to='invoice-files/%Y/%m/%d/', + null=True, + blank=True, ) created_date = models.DateTimeField(_('Created Date'), auto_now=True) diff --git a/invoices/tasks.py b/invoices/tasks.py index 48911d8..31980ec 100644 --- a/invoices/tasks.py +++ b/invoices/tasks.py @@ -18,5 +18,6 @@ def generate_pdf(invoice_id: int): with client.chromium.url_to_pdf() as task: res = task.url(print_url).run() invoice_file.file.save( - invoice_file.get_file_name('pdf'), ContentFile(res.content), + invoice_file.get_file_name('pdf'), + ContentFile(res.content), ) diff --git a/manage.py b/manage.py index 50693d3..ae43e66 100755 --- a/manage.py +++ b/manage.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -"""Django's command-line utility for administrative tasks.""" import os import sys