From 017fa4beabaf1bdd51e852f146893c7e17eb6d6a Mon Sep 17 00:00:00 2001 From: Kiran Jonnalagadda Date: Thu, 4 Apr 2024 16:40:08 +0530 Subject: [PATCH] Import Protocol from typing --- src/baseframe/extensions.py | 4 ++-- src/baseframe/forms/fields.py | 3 +-- src/baseframe/forms/typing.py | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/baseframe/extensions.py b/src/baseframe/extensions.py index bf25943e..67b60f2f 100644 --- a/src/baseframe/extensions.py +++ b/src/baseframe/extensions.py @@ -4,8 +4,8 @@ import os.path from datetime import tzinfo -from typing import Union, cast -from typing_extensions import LiteralString, Protocol +from typing import Protocol, Union, cast +from typing_extensions import LiteralString from flask import current_app, request from flask_babel import Babel, Domain diff --git a/src/baseframe/forms/fields.py b/src/baseframe/forms/fields.py index f8409692..54d11616 100644 --- a/src/baseframe/forms/fields.py +++ b/src/baseframe/forms/fields.py @@ -8,8 +8,7 @@ from collections.abc import Iterable, Mapping from datetime import datetime, tzinfo from decimal import Decimal, InvalidOperation as DecimalError -from typing import Any, Callable, Optional, Union, cast, runtime_checkable -from typing_extensions import Protocol +from typing import Any, Callable, Optional, Protocol, Union, cast, runtime_checkable from urllib.parse import urljoin import bleach diff --git a/src/baseframe/forms/typing.py b/src/baseframe/forms/typing.py index bd0dc1ba..19d279ce 100644 --- a/src/baseframe/forms/typing.py +++ b/src/baseframe/forms/typing.py @@ -1,8 +1,8 @@ """Form type aliases and protocols.""" from collections.abc import Generator, Iterable, Sequence -from typing import Any, Callable -from typing_extensions import Protocol, TypeAlias +from typing import Any, Callable, Protocol +from typing_extensions import TypeAlias from markupsafe import Markup from wtforms import Field as WTField, Form as WTForm