Whole file

lmittmann/style

The author described this change as โ€œ๐Ÿ› fixing named parameter bug on python 2.7โ€. It counts as a record because the check below fails on the code as it stood at 726c20df8 and passes on 3c57d43e2, with nothing else changed between the two runs.

Fix saved2017-01-26
Sharing licenceMIT ยท LICENSE
Change size+5 โˆ’1

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

๐Ÿ› fixing named parameter bug on python 2.7

The change

3535 self._style_list = style_list
3636 self._is_root = is_root
3737
38- def __call__(self, *objects, sep=' '):
38+ def __call__(self, *objects, **kwargs):
39+ sep = kwargs.get('sep', ' ')
40+ if type(sep) is not str:
41+ raise TypeError('sep must be None or a string, not %s' % type(sep).__name__)
42+
3943 string = sep.join(str(obj) for obj in objects)
4044 if _enabled and self._style_list:
4145 try:

The check that tells the two apart

failโ†’passยทclr/test/test_style_builder.py::StyleBuilderTestCase::test_non_string_seperator

Check file clr/test/test_style_builder.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 it726c20df86822a522127fffecd07e52f1fcb0819
Broken version dated2017-01-23
Moduleclr.style_builder
Units changedStyleBuilder
Fingerprint5076ccb390056f75
Checked2026-08-18 by goldset/0.1

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