mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-04 18:07:44 +03:00 
			
		
		
		
	Fixing py3 errors after recatoring of Catalog using metaclasses
This commit is contained in:
		
							parent
							
								
									0e272f9d58
								
							
						
					
					
						commit
						71101d98f8
					
				| 
						 | 
					@ -1,6 +1,7 @@
 | 
				
			||||||
"""Catalog module."""
 | 
					"""Catalog module."""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from six import iteritems
 | 
					from six import iteritems
 | 
				
			||||||
 | 
					from six import add_metaclass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from .errors import Error
 | 
					from .errors import Error
 | 
				
			||||||
from .utils import is_provider
 | 
					from .utils import is_provider
 | 
				
			||||||
| 
						 | 
					@ -25,14 +26,14 @@ class CatalogMetaClass(type):
 | 
				
			||||||
        return cls
 | 
					        return cls
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@add_metaclass(CatalogMetaClass)
 | 
				
			||||||
class AbstractCatalog(object):
 | 
					class AbstractCatalog(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    """Abstract providers catalog."""
 | 
					    """Abstract providers catalog."""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    providers = dict()
 | 
					    providers = dict()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    __slots__ = ('providers', '__used_providers__',)
 | 
					    __slots__ = ('__used_providers__',)
 | 
				
			||||||
    __metaclass__ = CatalogMetaClass
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, *used_providers):
 | 
					    def __init__(self, *used_providers):
 | 
				
			||||||
        """Initializer."""
 | 
					        """Initializer."""
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user