From 996fc4ecbf9b4c12f5b1b260631361a5e70054ab Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Mon, 20 Jul 2015 18:58:39 +0300 Subject: [PATCH] Updating singleton examples --- docs/providers/singleton.rst | 4 ---- examples/providers/singleton.py | 1 - examples/providers/singleton_reseting.py | 1 - 3 files changed, 6 deletions(-) diff --git a/docs/providers/singleton.rst b/docs/providers/singleton.rst index 2e62e813..dbe03bba 100644 --- a/docs/providers/singleton.rst +++ b/docs/providers/singleton.rst @@ -21,7 +21,6 @@ Example: """Example class UserService.""" - # Singleton provider creates new instance of specified class on first call and # returns same instance on every next call. users_service_provider = Singleton(UserService) @@ -35,7 +34,6 @@ Example: assert isinstance(user_service1, UserService) assert isinstance(user_service2, UserService) - Singleton providers and injections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -84,7 +82,6 @@ Example: """Example class UserService.""" - # Users service singleton provider: users_service_provider = Singleton(UserService) @@ -105,4 +102,3 @@ Example: # Making some asserts: assert user_service3 is not user_service1 - diff --git a/examples/providers/singleton.py b/examples/providers/singleton.py index 1f287b58..92caca00 100644 --- a/examples/providers/singleton.py +++ b/examples/providers/singleton.py @@ -7,7 +7,6 @@ class UserService(object): """Example class UserService.""" - # Singleton provider creates new instance of specified class on first call and # returns same instance on every next call. users_service_provider = Singleton(UserService) diff --git a/examples/providers/singleton_reseting.py b/examples/providers/singleton_reseting.py index a35fc6a8..be5780ef 100644 --- a/examples/providers/singleton_reseting.py +++ b/examples/providers/singleton_reseting.py @@ -7,7 +7,6 @@ class UserService(object): """Example class UserService.""" - # Users service singleton provider: users_service_provider = Singleton(UserService)