mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 12:29:24 +00:00
Add more Ruff rules (#891)
* ruff: apply rule F * ruff: apply rule E * ruff: apply rule SIM * ruff: apply rule TCH * ruff: apply rule ERA * ruff: apply rule PLW * ruff: apply rule FLY * ruff: apply rule PERF * ruff: apply rules FURB & RUF
This commit is contained in:
@ -17,11 +17,11 @@ import base64
|
||||
import json
|
||||
from datetime import datetime
|
||||
from enum import Enum
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import sentry_sdk
|
||||
from cryptography.exceptions import InvalidSignature
|
||||
from cryptography.hazmat.primitives.asymmetric.padding import PKCS1v15
|
||||
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicKey
|
||||
from cryptography.hazmat.primitives.hashes import SHA1
|
||||
from cryptography.hazmat.primitives.serialization import load_pem_public_key
|
||||
from django.conf import settings
|
||||
@ -47,6 +47,9 @@ from eboutic.models import (
|
||||
)
|
||||
from eboutic.schemas import PurchaseItemList, PurchaseItemSchema
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicKey
|
||||
|
||||
|
||||
@login_required
|
||||
@require_GET
|
||||
@ -221,7 +224,7 @@ class EtransactionAutoAnswer(View):
|
||||
# Payment authorized:
|
||||
# * 'Error' is '00000'
|
||||
# * 'Auto' is in the request
|
||||
if request.GET["Error"] == "00000" and "Auto" in request.GET.keys():
|
||||
if request.GET["Error"] == "00000" and "Auto" in request.GET:
|
||||
try:
|
||||
with transaction.atomic():
|
||||
b = (
|
||||
|
Reference in New Issue
Block a user