Lancetnik / FastDepends

FastDepends - FastAPI Dependency Injection system extracted from FastAPI and cleared of all HTTP logic. Async and sync modes are both supported.
https://lancetnik.github.io/FastDepends/
MIT License
281 stars 10 forks source link

#98 Fixed overriding variables. #110

Open alexanderlazarev0 opened 2 months ago

alexanderlazarev0 commented 2 months ago
def dep_func() -> int:
    return 1

@inject
def some_func(a: int = Depends(dep_func)) -> int:
    return a

print(some_func(a=2)) # 2
print(some_func(2)) # 2
Lancetnik commented 1 month ago

Can you, please, revert docs/ and styles changes to let me check logic only?

alexanderlazarev0 commented 1 month ago

Can you, please, revert docs/ and styles changes to let me check logic only?

@Lancetnik reset formatting, I had run ruff format before commit.