Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.

Commit aa483fc

Browse files
author
staticdev
committed
Removed redundant numbered parameters str.format()
1 parent e842f72 commit aa483fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/django_sorting_bootstrap/templatetags/sorting_tags.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def result_headers(context, cl):
2727
continue
2828

2929
# OK, it is sortable if we got this far
30-
th_classes = ["sortable", "column-{0}".format(field_name)]
30+
th_classes = ["sortable", "column-{}".format(field_name)]
3131
ascending = None
3232
is_sorted = False
3333
# Is it currently being sorted on?
@@ -76,7 +76,7 @@ def result_headers(context, cl):
7676
"sortable": True,
7777
"sorted": is_sorted,
7878
"ascending": ascending,
79-
"class_attrib": format_html(' class="{0}"', " ".join(th_classes))
79+
"class_attrib": format_html(' class="{}"', " ".join(th_classes))
8080
if th_classes
8181
else "",
8282
}
@@ -174,7 +174,7 @@ def auto_sort(parser, token):
174174
tag_name, queryset = token.split_contents()
175175
except ValueError:
176176
raise template.TemplateSyntaxError(
177-
"{0} tag requires a single argument".format(token.contents.split()[0])
177+
"{} tag requires a single argument".format(token.contents.split()[0])
178178
)
179179
return SortedQuerysetNode(queryset)
180180

0 commit comments

Comments
 (0)