From 0a81d19b7273037adbeecd2c2638ea7435c18827 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Sat, 18 Jul 2020 00:16:11 -0400 Subject: [PATCH] Update DI in Python page --- docs/introduction/di_in_python.rst | 6 +----- examples/miniapps/engines_cars/example/engines.py | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/docs/introduction/di_in_python.rst b/docs/introduction/di_in_python.rst index b772cf34..65a3727c 100644 --- a/docs/introduction/di_in_python.rst +++ b/docs/introduction/di_in_python.rst @@ -103,21 +103,18 @@ Listing of ``example.engines`` module: .. literalinclude:: ../../examples/miniapps/engines_cars/example/engines.py :language: python - :linenos: Listing of ``example.cars`` module: .. literalinclude:: ../../examples/miniapps/engines_cars/example/cars.py :language: python - :linenos: Next example demonstrates creation of several cars with different engines: .. literalinclude:: ../../examples/miniapps/engines_cars/example_di.py :language: python - :linenos: -While previous example demonstrates advantages of dependency injection, there +While previous example demonstrates advantages of dependency injection, there is a disadvantage demonstration as well - creation of car requires additional code for specification of dependencies. Nevertheless, this disadvantage could be easily avoided by using a dependency injection framework for creation of @@ -128,7 +125,6 @@ using :doc:`Dependency Injector <../index>`: .. literalinclude:: ../../examples/miniapps/engines_cars/example_ioc_containers.py :language: python - :linenos: Useful links ~~~~~~~~~~~~ diff --git a/examples/miniapps/engines_cars/example/engines.py b/examples/miniapps/engines_cars/example/engines.py index 9cdfd357..191f9e88 100644 --- a/examples/miniapps/engines_cars/example/engines.py +++ b/examples/miniapps/engines_cars/example/engines.py @@ -4,8 +4,8 @@ class Engine: """Example engine base class. - Engine is a heart of every car. Engine is a very common term and could be - implemented in very different ways. + Engine is a heart of every car. Engine is a very common term and + could be implemented in very different ways. """