Skip to content

Commit d398fed

Browse files
radarherehugovk
andauthored
Added underscores for readability
Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 1fe1bb4 commit d398fed

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Tests/test_imagefont.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1040,21 +1040,21 @@ def test_render_mono_size():
10401040

10411041
def test_too_many_characters(font):
10421042
with pytest.raises(ValueError):
1043-
font.getlength("A" * 1000001)
1043+
font.getlength("A" * 1_000_001)
10441044
with pytest.raises(ValueError):
1045-
font.getbbox("A" * 1000001)
1045+
font.getbbox("A" * 1_000_001)
10461046
with pytest.raises(ValueError):
1047-
font.getmask2("A" * 1000001)
1047+
font.getmask2("A" * 1_000_001)
10481048

10491049
transposed_font = ImageFont.TransposedFont(font)
10501050
with pytest.raises(ValueError):
1051-
transposed_font.getlength("A" * 1000001)
1051+
transposed_font.getlength("A" * 1_000_001)
10521052

10531053
default_font = ImageFont.load_default()
10541054
with pytest.raises(ValueError):
1055-
default_font.getlength("A" * 1000001)
1055+
default_font.getlength("A" * 1_000_001)
10561056
with pytest.raises(ValueError):
1057-
default_font.getbbox("A" * 1000001)
1057+
default_font.getbbox("A" * 1_000_001)
10581058

10591059

10601060
@pytest.mark.parametrize(

src/PIL/ImageFont.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Layout(IntEnum):
4141
RAQM = 1
4242

4343

44-
MAX_STRING_LENGTH = 1000000
44+
MAX_STRING_LENGTH = 1_000_000
4545

4646

4747
try:

0 commit comments

Comments
 (0)