From 46a7594340cdf5572d60ae9440d36635f7589ecf Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Wed, 15 Mar 2023 19:48:36 +0000 Subject: isort imports --- paste/__init__.py | 13 ++++++------- paste/__main__.py | 9 ++++----- paste/db.py | 8 ++++---- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/paste/__init__.py b/paste/__init__.py index f7ee3a8..85afc63 100644 --- a/paste/__init__.py +++ b/paste/__init__.py @@ -1,14 +1,13 @@ -from base64 import b64decode, b64encode -from functools import wraps -from wsgiref.util import request_uri -from typing import Optional, Any, Protocol, runtime_checkable -from collections.abc import Callable, Iterable import binascii import traceback +from base64 import b64decode, b64encode +from collections.abc import Callable, Iterable +from functools import wraps from sqlite3 import Connection +from typing import Any, Optional, Protocol, runtime_checkable +from wsgiref.util import request_uri -from . import db -from . import store +from . import db, store @runtime_checkable diff --git a/paste/__main__.py b/paste/__main__.py index f1aa117..325bf09 100644 --- a/paste/__main__.py +++ b/paste/__main__.py @@ -1,15 +1,14 @@ -from base64 import b64encode, b64decode +from base64 import b64decode, b64encode +from contextlib import AbstractContextManager from datetime import datetime, timezone from hashlib import sha256 from os import getenv from secrets import token_bytes +from sqlite3 import Connection from sys import argv, stderr from wsgiref.simple_server import make_server -from sqlite3 import Connection -from contextlib import AbstractContextManager -from . import application, DB_PATH -from . import db +from . import DB_PATH, application, db TOKEN_BYTES = 96 // 8 PROGRAM_NAME = "paste" diff --git a/paste/db.py b/paste/db.py index 15e4f03..bef3c46 100644 --- a/paste/db.py +++ b/paste/db.py @@ -1,9 +1,9 @@ +import sqlite3 +from collections.abc import Iterator from contextlib import contextmanager -from hashlib import sha256 +from hashlib import blake2b, sha256 from itertools import count -from collections.abc import Iterator -from typing import Union -import sqlite3 +from typing import Optional, Union migrations = [ """CREATE TABLE file ( -- cgit v1.2.3-54-g00ecf