# HG changeset patch # User Ludovic Chabant # Date 1453100948 28800 # Node ID eedd63b7cf42579835918566396539fed0fbc7df # Parent 3cca1f6bd610c4e043095556b5a8a822692852b7 debug: Don't show parentheses on redirected properties. diff -r 3cca1f6bd610 -r eedd63b7cf42 piecrust/data/debug.py --- a/piecrust/data/debug.py Sun Jan 17 23:08:40 2016 -0800 +++ b/piecrust/data/debug.py Sun Jan 17 23:09:08 2016 -0800 @@ -309,9 +309,11 @@ value = None render_name = name should_call = name in invoke_attrs + is_redirect = False if name in redirects: name = redirects[name] + is_redirect = True query_instance = False try: @@ -329,7 +331,10 @@ argcount = attr_func.__code__.co_argcount var_names = attr_func.__code__.co_varnames if argcount == 1 and should_call: - render_name += '()' + if not is_redirect: + # Most of the time, redirects are for making a + # property render better. So don't add parenthesis. + render_name += '()' value = attr_func() else: if should_call: