mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-28 00:49:49 +03:00
Fix Python 3.5 compatibility
This commit is contained in:
parent
ed733b7d4c
commit
b06c8ea7df
|
@ -35,10 +35,10 @@ def _is_extra_action(attr):
|
||||||
|
|
||||||
def _check_attr_name(func, name):
|
def _check_attr_name(func, name):
|
||||||
assert func.__name__ == name, (
|
assert func.__name__ == name, (
|
||||||
f'Expected function (`{func.__name__}`) to match its attribute name '
|
'Expected function (`{func.__name__}`) to match its attribute name '
|
||||||
f'(`{name}`). If using a decorator, ensure the inner function is '
|
'(`{name}`). If using a decorator, ensure the inner function is '
|
||||||
f'decorated with `functools.wraps`, or that `{func.__name__}.__name__` '
|
'decorated with `functools.wraps`, or that `{func.__name__}.__name__` '
|
||||||
f'is otherwise set to `{name}`.')
|
'is otherwise set to `{name}`.').format(func=func, name=name)
|
||||||
return func
|
return func
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user