Mityuha / fresh-bakery

Bake dependency injections asynchronously and stupidly simple
https://fresh-bakery.readthedocs.io/en/latest/
MIT License
21 stars 0 forks source link

Complain non-existent attributes #40

Closed Mityuha closed 6 months ago

Mityuha commented 7 months ago

34

Mypy errors for the following case

from bakery import Bakery, Cake

class MyBakery(Bakery):
    attribute: int = Cake(1)

MyBakery.non_existent  # Type[MyBakery] has no attribute "non_existent"
async with MyBakery() as bakery:
    assert bakery.non_existent  # "MyBakery" has no attribute "non_existent"