Skip to content

Commit

Permalink
chore: bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Lancetnik committed Jun 5, 2024
1 parent 5585390 commit afd278d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion fast_depends/__about__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""FastDepends - extracted and cleared from HTTP domain FastAPI Dependency Injection System"""

__version__ = "2.4.3"
__version__ = "2.4.4"
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions tests/test_prebuild.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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!"

Expand Down

0 comments on commit afd278d

Please sign in to comment.