mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-05-22 13:36:15 +03:00
Fix the issue
This commit is contained in:
parent
cfbed20a05
commit
16fbb37694
|
@ -915,12 +915,12 @@ struct __pyx_obj_19dependency_injector_9providers_Delegate {
|
|||
*
|
||||
*
|
||||
* cdef class Dependency(Provider): # <<<<<<<<<<<<<<
|
||||
* cdef type __instance_of
|
||||
* cdef object __instance_of
|
||||
*
|
||||
*/
|
||||
struct __pyx_obj_19dependency_injector_9providers_Dependency {
|
||||
struct __pyx_obj_19dependency_injector_9providers_Provider __pyx_base;
|
||||
PyTypeObject *__pyx___instance_of;
|
||||
PyObject *__pyx___instance_of;
|
||||
};
|
||||
|
||||
|
||||
|
@ -1485,7 +1485,7 @@ static struct __pyx_vtabstruct_19dependency_injector_9providers_Delegate *__pyx_
|
|||
*
|
||||
*
|
||||
* cdef class Dependency(Provider): # <<<<<<<<<<<<<<
|
||||
* cdef type __instance_of
|
||||
* cdef object __instance_of
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -28,7 +28,7 @@ cdef class Delegate(Provider):
|
|||
|
||||
|
||||
cdef class Dependency(Provider):
|
||||
cdef type __instance_of
|
||||
cdef object __instance_of
|
||||
|
||||
|
||||
cdef class ExternalDependency(Dependency):
|
||||
|
|
|
@ -419,8 +419,16 @@ cdef class Dependency(Provider):
|
|||
:type: type
|
||||
"""
|
||||
|
||||
def __init__(self, type instance_of=object):
|
||||
def __init__(self, object instance_of=object):
|
||||
"""Initializer."""
|
||||
if not isinstance(instance_of, CLASS_TYPES):
|
||||
raise TypeError(
|
||||
'Argument \'instance_of\' has incorrect type (expected {0}, got {1}))'.format(
|
||||
CLASS_TYPES,
|
||||
instance_of,
|
||||
)
|
||||
)
|
||||
|
||||
self.__instance_of = instance_of
|
||||
super(Dependency, self).__init__()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user