mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-07-02 03:13:15 +03:00
Update main example
This commit is contained in:
parent
258c55dd22
commit
67d16bf48b
|
@ -1,7 +1,5 @@
|
|||
"""Wiring example."""
|
||||
|
||||
import sys
|
||||
|
||||
from dependency_injector import containers, providers
|
||||
from dependency_injector.wiring import inject, Provide
|
||||
|
||||
|
@ -22,6 +20,6 @@ def main(service: Service = Provide[Container.service]) -> None:
|
|||
|
||||
if __name__ == '__main__':
|
||||
container = Container()
|
||||
container.wire(modules=[sys.modules[__name__]])
|
||||
container.wire(modules=["__main__"])
|
||||
|
||||
main()
|
||||
|
|
Loading…
Reference in New Issue
Block a user