mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Removed unnecessary wrapping of __bytes__ in proxy class in lazy().
This commit is contained in:
parent
c7ba2e3cbb
commit
459f30f73e
@ -126,8 +126,6 @@ def lazy(func, *resultclasses):
|
||||
"Cannot call lazy() with both bytes and text return types."
|
||||
)
|
||||
|
||||
if cls._delegate_bytes:
|
||||
cls.__bytes__ = cls.__bytes_cast
|
||||
|
||||
@classmethod
|
||||
def __promise__(cls, method_name):
|
||||
@ -140,9 +138,6 @@ def lazy(func, *resultclasses):
|
||||
|
||||
return __wrapper__
|
||||
|
||||
def __bytes_cast(self):
|
||||
return bytes(func(*self.__args, **self.__kw))
|
||||
|
||||
def __cast(self):
|
||||
return func(*self.__args, **self.__kw)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user