
import movies.finders
import movies.listers
import movies.models

import dependency_injector.containers as containers
import dependency_injector.providers as providers


class MoviesModule(containers.DeclarativeContainer):
    """IoC container of movies module component providers."""

    models_factory = providers.Factory(movies.models.Movie)

    finder = providers.AbstractFactory(movies.finders.MovieFinder,
                                       movie_model=models_factory.delegate())

    lister = providers.Factory(movies.listers.MovieLister,
                               movie_finder=finder)


import movies.finders
import movies.listers
import movies.models

import dependency_injector.containers as containers
import dependency_injector.providers as providers


class MoviesModule(containers.DeclarativeContainer):
    """IoC container of movies module component providers."""

    movie = providers.Factory(movies.models.Movie)

    finder = providers.AbstractFactory(movies.finders.MovieFinder,
                                       movie_model=movie.provider)

    lister = providers.Factory(movies.listers.MovieLister,
                               movie_finder=finder)

Add minor fixes to movie lister miniapp
Add minor fixes to movie lister miniapp

  
  import movies.finders
  import movies.listers
  import movies.models
  
  import dependency_injector.containers as containers
  import dependency_injector.providers as providers
  
  
  class MoviesModule(containers.DeclarativeContainer):
      """IoC container of movies module component providers."""
  
-     models_factory = providers.Factory(movies.models.Movie)
+     movie = providers.Factory(movies.models.Movie)
  
      finder = providers.AbstractFactory(movies.finders.MovieFinder,
-                                        movie_model=models_factory.delegate())
+                                        movie_model=movie.provider)
  
      lister = providers.Factory(movies.listers.MovieLister,
                                 movie_finder=finder)
  
Add minor fixes to movie lister miniapp
## Code Before:

import movies.finders
import movies.listers
import movies.models

import dependency_injector.containers as containers
import dependency_injector.providers as providers


class MoviesModule(containers.DeclarativeContainer):
    """IoC container of movies module component providers."""

    models_factory = providers.Factory(movies.models.Movie)

    finder = providers.AbstractFactory(movies.finders.MovieFinder,
                                       movie_model=models_factory.delegate())

    lister = providers.Factory(movies.listers.MovieLister,
                               movie_finder=finder)

## Instruction:
Add minor fixes to movie lister miniapp
## Code After:

import movies.finders
import movies.listers
import movies.models

import dependency_injector.containers as containers
import dependency_injector.providers as providers


class MoviesModule(containers.DeclarativeContainer):
    """IoC container of movies module component providers."""

    movie = providers.Factory(movies.models.Movie)

    finder = providers.AbstractFactory(movies.finders.MovieFinder,
                                       movie_model=movie.provider)

    lister = providers.Factory(movies.listers.MovieLister,
                               movie_finder=finder)
