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

Forbid to set attributes to cake #10

Open Mityuha opened 2 years ago

Mityuha commented 2 years ago

Now it's possible to assign any attribute to cake

from bakery import Cake
cake = Cake(1)
cake.is_one = True
print(cake.is_one)  # True

And if object within cake has attribute with the same name it can lead to errors. (maybe use __slots__ for all library classes?)