From afd278d3cb58f09e1b40e4dbd5181db1be0e3d63 Mon Sep 17 00:00:00 2001 From: Nikita Pastukhov Date: Thu, 6 Jun 2024 00:12:38 +0300 Subject: [PATCH] chore: bump version --- fast_depends/__about__.py | 2 +- pyproject.toml | 5 +++-- tests/test_prebuild.py | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/fast_depends/__about__.py b/fast_depends/__about__.py index fb2ab61..3e9462e 100644 --- a/fast_depends/__about__.py +++ b/fast_depends/__about__.py @@ -1,3 +1,3 @@ """FastDepends - extracted and cleared from HTTP domain FastAPI Dependency Injection System""" -__version__ = "2.4.3" +__version__ = "2.4.4" diff --git a/pyproject.toml b/pyproject.toml index 4477fc5..798f4af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ ignore_missing_imports = true profile = "black" known_third_party = ["pydantic", "anyio"] -[tool.ruff] +[tool.ruff.lint] select = [ "E", # pycodestyle errors https://docs.astral.sh/ruff/rules/#error-e "W", # pycodestyle warnings https://docs.astral.sh/ruff/rules/#warning-w @@ -86,12 +86,13 @@ select = [ "PERF", # Perflint https://docs.astral.sh/ruff/rules/#perflint-perf "UP", # pyupgrade https://docs.astral.sh/ruff/rules/#pyupgrade-up ] + ignore = [ "E501", # line too long, handled by black "C901", # too complex ] -[tool.ruff.flake8-bugbear] +[tool.ruff.lint.flake8-bugbear] extend-immutable-calls = [ "fast_depends.Depends", "AsyncHeader", "Header", "MyDep", diff --git a/tests/test_prebuild.py b/tests/test_prebuild.py index 368b54f..ceee371 100644 --- a/tests/test_prebuild.py +++ b/tests/test_prebuild.py @@ -1,12 +1,12 @@ from __future__ import annotations +from pydantic import BaseModel + from fast_depends.core import build_call_model from fast_depends.use import inject from .wrapper import noop_wrap -from pydantic import BaseModel - class Model(BaseModel): a: str @@ -20,12 +20,12 @@ def model_func(m: Model) -> str: return m.a -def test_prebuild(): +def test_prebuild() -> None: model = build_call_model(base_func) inject()(None, model)(1) -def test_prebuild_with_wrapper(): +def test_prebuild_with_wrapper() -> None: func = noop_wrap(model_func) assert func(Model(a="Hi!")) == "Hi!"