Updated to python3.10
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from abc import abstractmethod, ABC
|
||||
from collections import Callable
|
||||
from collections.abc import Callable
|
||||
from typing import Type
|
||||
|
||||
from cpl_core.database.database_settings import DatabaseSettings
|
||||
|
@@ -1,4 +1,3 @@
|
||||
from collections import Callable
|
||||
import copy
|
||||
from inspect import signature, Parameter
|
||||
from typing import Optional
|
||||
@@ -96,7 +95,7 @@ class ServiceProvider(ServiceProviderABC):
|
||||
sb = ScopeBuilder(ServiceProvider(copy.deepcopy(self._service_descriptors), self._configuration, self._database_context))
|
||||
return sb.build()
|
||||
|
||||
def get_service(self, service_type: type) -> Optional[Callable[object]]:
|
||||
def get_service(self, service_type: type) -> Optional[object]:
|
||||
result = self._find_service(service_type)
|
||||
|
||||
if result is None:
|
||||
|
@@ -1,5 +1,4 @@
|
||||
from abc import abstractmethod, ABC
|
||||
from collections import Callable
|
||||
from typing import Type, Optional
|
||||
|
||||
from cpl_core.dependency_injection.scope_abc import ScopeABC
|
||||
@@ -49,7 +48,7 @@ class ServiceProviderABC(ABC):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def get_service(self, instance_type: Type) -> Optional[Callable[object]]:
|
||||
def get_service(self, instance_type: Type) -> Optional[object]:
|
||||
r"""Returns instance of given type
|
||||
|
||||
Parameter
|
||||
|
Reference in New Issue
Block a user