Remove f-strings from set_provides()

This commit is contained in:
Roman Mogylatov 2021-03-07 10:39:29 -05:00
parent fad03f2957
commit 7407758827
2 changed files with 5448 additions and 5377 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1072,8 +1072,10 @@ cdef class Callable(Provider):
"""Set provider's provides.""" """Set provider's provides."""
if provides and not callable(provides): if provides and not callable(provides):
raise Error( raise Error(
f'Provider {_class_qualname(self)} expected to get callable, ' 'Provider {0} expected to get callable, got {1} instead'.format(
f'got {provides} instead' _class_qualname(self),
provides,
),
) )
self.__provides = provides self.__provides = provides
return self return self
@ -2138,8 +2140,10 @@ cdef class Factory(Provider):
and self.__class__.provided_type and and self.__class__.provided_type and
not issubclass(provides, self.__class__.provided_type)): not issubclass(provides, self.__class__.provided_type)):
raise Error( raise Error(
f'{_class_qualname(self)} can provide only ' '{0} can provide only {1} instances'.format(
f'{self.__class__.provided_type} instances' _class_qualname(self),
self.__class__.provided_type,
),
) )
self.__instantiator.set_provides(provides) self.__instantiator.set_provides(provides)
return self return self
@ -2503,8 +2507,10 @@ cdef class BaseSingleton(Provider):
and self.__class__.provided_type and and self.__class__.provided_type and
not issubclass(provides, self.__class__.provided_type)): not issubclass(provides, self.__class__.provided_type)):
raise Error( raise Error(
f'{_class_qualname(self)} can provide only ' '{0} can provide only {1} instances'.format(
f'{self.__class__.provided_type} instances' _class_qualname(self),
self.__class__.provided_type,
),
) )
self.__instantiator.set_provides(provides) self.__instantiator.set_provides(provides)
return self return self