reorganize imports with ruff

This commit is contained in:
thomas girod
2024-06-24 13:07:36 +02:00
parent 9bdf3fc4ac
commit 3143d3d91a
170 changed files with 702 additions and 804 deletions

View File

@ -25,8 +25,8 @@
import json
import re
import typing
from urllib.parse import unquote
from django.http import HttpRequest
from django.utils.translation import gettext as _
from sentry_sdk import capture_message

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import accounting.models
from django.conf import settings
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
import accounting.models
class Migration(migrations.Migration):

View File

@ -14,21 +14,20 @@
#
#
import hmac
import html
import typing
from datetime import datetime
from typing import List
from dict2xml import dict2xml
from django.conf import settings
from django.db import models, DataError
from django.db.models import Sum, F
from django.db import DataError, models
from django.db.models import F, Sum
from django.utils.functional import cached_property
from django.utils.translation import gettext_lazy as _
from accounting.models import CurrencyField
from core.models import Group, User
from counter.models import Counter, Product, Selling, Refilling, BillingInfo, Customer
from core.models import User
from counter.models import BillingInfo, Counter, Customer, Product, Refilling, Selling
def get_eboutic_products(user: User) -> List[Product]:

View File

@ -26,15 +26,14 @@ import base64
import json
import urllib
from OpenSSL import crypto
from django.conf import settings
from django.core.management import call_command
from django.db.models import Max
from django.test import TestCase
from django.urls import reverse
from OpenSSL import crypto
from core.models import User
from counter.models import Product, Counter, Customer, Selling
from counter.models import Counter, Customer, Product, Selling
from eboutic.models import Basket

View File

@ -7,6 +7,7 @@
#
import base64
from OpenSSL import crypto
with open("./private_key.pem") as f:

View File

@ -25,8 +25,8 @@
from django.urls import path, register_converter
from eboutic.views import *
from eboutic.converters import PaymentResultConverter
from eboutic.views import *
register_converter(PaymentResultConverter, "res")

View File

@ -16,23 +16,23 @@
import base64
import json
import sentry_sdk
from datetime import datetime
from urllib.parse import unquote
from OpenSSL import crypto
import sentry_sdk
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.core.exceptions import SuspiciousOperation
from django.db import transaction, DatabaseError
from django.http import HttpResponse, HttpRequest
from django.shortcuts import render, redirect
from django.db import DatabaseError, transaction
from django.http import HttpRequest, HttpResponse
from django.shortcuts import redirect, render
from django.utils.decorators import method_decorator
from django.views.decorators.http import require_GET, require_POST
from django.views.generic import TemplateView, View
from OpenSSL import crypto
from counter.forms import BillingInfoForm
from counter.models import Customer, Counter, Product
from counter.models import Counter, Customer, Product
from eboutic.forms import BasketForm
from eboutic.models import Basket, Invoice, InvoiceItem, get_eboutic_products