adriangb / di

Pythonic dependency injection
https://www.adriangb.com/di/
MIT License
303 stars 13 forks source link

docs: fix examples lines #81

Closed woile closed 2 years ago

woile commented 2 years ago

Hello! Thanks for this fantastic project. I just started using it and while digesting the docs I found these little errors.

Besides this small fix, I'd like to ask if it would be possible to add some docstrings to some functions and classes. I tend to hover over the objects in my editor to read the description, and now I find myself searching in the docs to find mostly examples, not what the particular functions does. Some examples are: bind_by_type, Container, enter_scope, ConcurrentAsyncExecutor. I'm new to DI so I'm still building my intuition and it would be really helpful 🙏🏻 .

Thanks again!

adriangb commented 2 years ago

Hi, thank you so much for taking the time to fix these issues as you went through the docs! The line highlighting has been a constant source of issues: while all of the code in the docs is executed to make sure it is up to date, there is nothing to check the line highlighting 😞.

Besides this small fix, I'd like to ask if it would be possible to add some docstrings to some functions and classes.

Yes this would be really great! The only reason there are not many docstrings yet is just time and stability. I would love a PR to add docstrings to the most important public facing bits and am happy to guide/clarify any bits of the API that are unclear. I hope to get to writing better docstrings and cleaning up tests at some point but I've been a bit time constrained lately.

woile commented 2 years ago

I'll try to add some docstrings then and we can discuss them in a PR.