Whole file

solaluset/i18nice

The author described this change as fix funcs without positional args (#57). It counts as a record because the check below fails on the code as it stood at d4630f330 and passes on 19de827e1, with nothing else changed between the two runs.

Fix saved2024-05-06
Sharing licenceMIT · LICENSE
Change size+5 1

What the code was meant to do, written into the code itself as a save note

fix funcs without positional args (#57)

The change

144144 if args:
145145 f = get_function(name, self.locale)
146146 if f:
147- arg_list = args.strip(")").split(config.get("argument_delimiter"))
147+ args = args.strip(")")
148+ if args:
149+ arg_list = args.split(config.get("argument_delimiter"))
150+ else:
151+ arg_list = []
148152 try:
149153 return f(*arg_list, **self.kwargs)
150154 except KeyError as e:

The check that tells the two apart

failpass·i18n/tests/translation_tests.py::TestTranslationFormat::test_function_without_args

Check file i18n/tests/translation_tests.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before itd4630f330c6649f88dc448e970ed0f3b5041b785
Broken version dated2024-05-06
Modulei18n.formatters
Units changedTranslationFormatter
Fingerprint19a9fd2c9ef7b8e6
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in solaluset/i18nice