Skip to content

Commit cd34712

Browse files
Make implicit curly braces explicit as per PEP 0007.
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
1 parent 40a6297 commit cd34712

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/_json.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1519,8 +1519,9 @@ encoder_listencode_dict(PyEncoderObject *s, _PyUnicodeWriter *writer,
15191519
bool first = true;
15201520

15211521
if (PyDict_CheckExact(dct)) {
1522-
if (PyDict_GET_SIZE(dct) == 0) /* Fast path */
1522+
if (PyDict_GET_SIZE(dct) == 0) { /* Fast path */
15231523
return _PyUnicodeWriter_WriteASCIIString(writer, "{}", 2);
1524+
}
15241525
} else {
15251526
// Note that as noted in #55186, we can't use `PyDict_Size` here since we're dealing with a subclass.
15261527
if (PyMapping_Size(dct) == 0) /* Fast path for subclasses */

0 commit comments

Comments
 (0)