From 5ec433a62f9328e04a65d1308e2bc7a22eaafeb6 Mon Sep 17 00:00:00 2001 From: Lancetnik Date: Sat, 5 Aug 2023 21:52:26 +0300 Subject: [PATCH] style: import Protocol from extensions --- fast_depends/use.py | 15 +++------------ pyproject.toml | 1 + scripts/lint.sh | 1 + 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/fast_depends/use.py b/fast_depends/use.py index 5e057b1..e4fc251 100644 --- a/fast_depends/use.py +++ b/fast_depends/use.py @@ -1,17 +1,8 @@ from contextlib import AsyncExitStack, ExitStack from functools import wraps -from typing import ( - Any, - Awaitable, - Callable, - Optional, - Protocol, - Sequence, - Union, - overload, -) - -from typing_extensions import ParamSpec, TypeVar +from typing import Any, Awaitable, Callable, Optional, Sequence, Union, overload + +from typing_extensions import ParamSpec, Protocol, TypeVar from fast_depends.core import CallModel, build_call_model from fast_depends.dependencies import dependency_provider, model diff --git a/pyproject.toml b/pyproject.toml index 4006ba3..c480f9e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,6 +73,7 @@ dev = [ "black>=23.3.0", "isort>=5", "ruff>=0.0.260", + "pyupgrade-directories", ] [tool.hatch.metadata] diff --git a/scripts/lint.sh b/scripts/lint.sh index 539636c..a68225e 100644 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -1,3 +1,4 @@ +pyup_dirs --py37-plus --recursive propan tests mypy fast_depends ruff fast_depends tests --fix black fast_depends tests