di does auto wiring for dependencies which is super convenient to avoid boilerplate. But let's say you have something like:
class DBConnection:
def __init__(self, host: str) -> None:
...
We (wrongly) assume that this can be constructed like DBConnection(host=str()). This is because we inspect the type annotation and autowire str itself!
We need some way of cutting off how deep we auto-wire. I think a sensible rule would be "all of the leaf dependencies (dependencies with no further dependencies) must be manually wired with:
Marker(function_that_accepts_no_arguments)
- A default value
- A bind