docs and fix

This commit is contained in:
2025-10-21 22:56:29 +03:00
parent 90e80d3454
commit f38da15bdb
25 changed files with 215 additions and 45 deletions
+4 -4
View File
@@ -18,19 +18,19 @@
.. note::
``argenta.di.FromDishka`` это алиас к ``dishka.FromDishka``, они полностью взаимозаменяемы.
.. literalinclude:: ../code_snippets/dependency_injection_example_sample.py
.. literalinclude:: ../code_snippets/dependency_injection_snippet.py
:language: python
:linenos:
``Argenta`` -> ``dishka`` зарезолвит тайпхинты и внедрит зависимость с возвращаемым типом ``Connection``, прежде чем использовать зависимость её нужно создать, для этого нужно создать соответствующий провайдер.
.. literalinclude:: ../code_snippets/dependency_injection_example_sample2.py
.. literalinclude:: ../code_snippets/dependency_injection_snippet2.py
:language: python
:linenos:
После создания провайдера, его нужно зарегистрировать в оркестраторе.
.. literalinclude:: ../code_snippets/dependency_injection_example_sample3.py
.. literalinclude:: ../code_snippets/dependency_injection_snippet3.py
:language: python
:linenos:
@@ -49,7 +49,7 @@
Краткий сэмпл кода, который получает объект ``ArgSpace`` и выводит в консоль аргумент с именем "type":
.. literalinclude:: ../code_snippets/dependency_injection_example_sample4.py
.. literalinclude:: ../code_snippets/dependency_injection_snippet4.py
:language: python
:linenos: