Whole file
nneonneo/fixedint
The author described this change as “Add a test and fix for HexFormattingMixin”. It counts as a record because the check below fails on the code as it stood at ed30ed170 and passes on 1ff981694, with nothing else changed between the two runs.
Projectnneonneo/fixedint
Fix saved2014-06-21
Sharing licencePSF-2.0 · LICENSE
Change size+1 −0
What the code was meant to do, written into the code itself as a save note
Add a test and fix for HexFormattingMixin
The change
| 1 | 1 | class HexFormattingMixin(object): | |
| 2 | 2 | def __str__(self): | |
| 3 | + | n = int(self) | |
| 3 | 4 | width = (self.width + 3) // 4 | |
| 4 | 5 | if n < 0: | |
| 5 | 6 | return '-0x%0*x' % (width, -n) |
The check that tells the two apart
fail→pass·fixedint/test_fixedint.py::ClassTests::test_subclassing
Check file fixedint/test_fixedint.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 ited30ed17017ca54692780534d0cae53a8b63731c
Broken version dated2014-06-21
Modulefixedint.util
Units changedHexFormattingMixin
Fingerprint30ff56000258ec4f
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.