From 60aa82b63d1ed82a273ef7839896372d5b8ee7f8 Mon Sep 17 00:00:00 2001 From: SouthFox Date: Thu, 27 Jul 2023 15:49:14 +0800 Subject: [PATCH] [lint] some lint --- demo/httpsig.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/demo/httpsig.py b/demo/httpsig.py index 98c0647..105ae99 100644 --- a/demo/httpsig.py +++ b/demo/httpsig.py @@ -6,16 +6,17 @@ import base64 import httpx import hashlib -from datetime import datetime -from app import logger -from demo.config import ID - -from dataclasses import dataclass from Crypto.Hash import SHA256 from Crypto.Signature import PKCS1_v1_5 from Crypto.PublicKey import RSA from werkzeug.datastructures import Headers from httpx import Headers as Httpx_headers +from datetime import datetime +from loguru import logger + +from dataclasses import dataclass +from demo.config import ID + @dataclass @@ -158,7 +159,8 @@ class HTTPXSigAuth(httpx.Auth): key_id = f"{ID}#main-key" - sig_value = f'keyId="{key_id}",algorithm="rsa-sha256",headers="{sigheaders}",signature="{sig.decode()}"' # noqa: E501 + sig_value = f'keyId="{key_id}",algorithm="rsa-sha256",\ + headers="{sigheaders}",signature="{sig.decode()}"' logger.debug(f"signed request {sig_value=}") r.headers["signature"] = sig_value yield r