Skip to content

Commit 97c04b5

Browse files
authored
Invoke forgotten PEP-7 rule
1 parent c6feca6 commit 97c04b5

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

Python/codecs.c

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -737,27 +737,13 @@ codec_handler_write_unicode_hex(Py_UCS1 **p, Py_UCS4 ch)
737737
static inline int
738738
n_decimal_digits_for_codepoint(Py_UCS4 ch)
739739
{
740-
if (ch < 10) {
741-
return 1;
742-
}
743-
if (ch < 100) {
744-
return 2;
745-
}
746-
if (ch < 1000) {
747-
return 3;
748-
}
749-
if (ch < 10000) {
750-
return 4;
751-
}
752-
if (ch < 100000) {
753-
return 5;
754-
}
755-
if (ch < 1000000) {
756-
return 6;
757-
}
758-
if (ch < 10000000) {
759-
return 7;
760-
}
740+
if (ch < 10) return 1;
741+
if (ch < 100) return 2;
742+
if (ch < 1000) return 3;
743+
if (ch < 10000) return 4;
744+
if (ch < 100000) return 5;
745+
if (ch < 1000000) return 6;
746+
if (ch < 10000000) return 7;
761747
// Unicode codepoints are limited to 1114111 (7 decimal digits)
762748
Py_UNREACHABLE();
763749
}

0 commit comments

Comments
 (0)