cformat.rs: emit correct "not all arguments" errors for byte formatting
Without this, the code would accept `b"eggs" % b"ham"` and `b"eggs" %
bytearray(b"ham")` because it would detect bytes and bytearray as
mappings (which _are_ permitted to have leftover, unprocessed
arguments).
@@ -666,7 +666,8 @@ impl CFormatBytes {
let is_mapping = values_obj.class().has_attr("__getitem__")
&& !values_obj.isinstance(&vm.ctx.types.tuple_type)
- && !values_obj.isinstance(&vm.ctx.types.str_type);
+ && !values_obj.isinstance(&vm.ctx.types.bytes_type)
+ && !values_obj.isinstance(&vm.ctx.types.bytearray_type);
if num_specifiers == 0 {
// literal only
