134 + if fallback: 135 + g_func = translation.get_gettext(TEST_DOMAIN, fallback) 136 + else: 137 + g_func = translation.get_gettext(TEST_DOMAIN)
There's nothing functionally wrong with this, but it's a bit repetitive. Would something like the below part work?
args = [TEST_DOMAIN] args.append(fallback) if fallback else None gfunc = translation.get_gettext(*args)
** I don't know if that's readable to everyone so I'm not marking this "Needs Fixing". I prefer to avoid if/else blocks that only choose one line or a very similar other line.
« Back to merge proposal
134 + if fallback: get_gettext( TEST_DOMAIN, fallback) get_gettext( TEST_DOMAIN)
135 + g_func = translation.
136 + else:
137 + g_func = translation.
There's nothing functionally wrong with this, but it's a bit repetitive. Would something like the below part work?
args = [TEST_DOMAIN] fallback) if fallback else None get_gettext( *args)
args.append(
gfunc = translation.
** I don't know if that's readable to everyone so I'm not marking this "Needs Fixing". I prefer to avoid if/else blocks that only choose one line or a very similar other line.