diff --git a/django_unicorn/templatetags/unicorn.py b/django_unicorn/templatetags/unicorn.py index 04e9c442..a796079b 100644 --- a/django_unicorn/templatetags/unicorn.py +++ b/django_unicorn/templatetags/unicorn.py @@ -46,7 +46,8 @@ def unicorn(parser, token): contents = token.split_contents() if len(contents) < MINIMUM_ARGUMENT_COUNT: - raise template.TemplateSyntaxError("%r tag requires at least a single argument" % token.contents.split()[0]) + first_arg = token.contents.split()[0] + raise template.TemplateSyntaxError(f"{first_arg} tag requires at least a single argument") component_name = parser.compile_filter(contents[1])