From b06c8ea7df8ac3e10f8c489c831a267ec98e31c1 Mon Sep 17 00:00:00 2001 From: Ryan P Kilby Date: Sun, 12 Jan 2020 13:04:55 -0800 Subject: [PATCH] Fix Python 3.5 compatibility --- rest_framework/viewsets.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rest_framework/viewsets.py b/rest_framework/viewsets.py index 39fb5a5ff..5a1f8acf5 100644 --- a/rest_framework/viewsets.py +++ b/rest_framework/viewsets.py @@ -35,10 +35,10 @@ def _is_extra_action(attr): def _check_attr_name(func, name): assert func.__name__ == name, ( - f'Expected function (`{func.__name__}`) to match its attribute name ' - f'(`{name}`). If using a decorator, ensure the inner function is ' - f'decorated with `functools.wraps`, or that `{func.__name__}.__name__` ' - f'is otherwise set to `{name}`.') + 'Expected function (`{func.__name__}`) to match its attribute name ' + '(`{name}`). If using a decorator, ensure the inner function is ' + 'decorated with `functools.wraps`, or that `{func.__name__}.__name__` ' + 'is otherwise set to `{name}`.').format(func=func, name=name) return func