◐ Shell
clean mode source ↗

Fix issue with cformat converting bytes to string for bytesinner by MegasKomnenos · Pull Request #4760 · RustPython/RustPython

This is a follow-up of the following PR
#4746

It addresses the failing test case for test_mod, where,

b'...%(foo)b...' % {b'foo':b"abc"}

caused invalid key error for 'foo'

The cause of this issue was that individual tokens in bytesinner were converted to string before being used for string formatting, but the token being addressed was expected to be in bytes.

It was addressed by making sure that it is treated as bytes.