Skip to content

Commit f378f98

Browse files
authored
if else optimization (#8340)
Removed redundant parentheses
1 parent 02eeb6f commit f378f98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def action(methods=None, detail=None, url_path=None, url_name=None, **kwargs):
142142
how the `@renderer_classes` etc. decorators work for function-
143143
based API views.
144144
"""
145-
methods = ['get'] if (methods is None) else methods
145+
methods = ['get'] if methods is None else methods
146146
methods = [method.lower() for method in methods]
147147

148148
assert detail is not None, (

0 commit comments

Comments
 (0)