Skip to content

Commit 929c4ec

Browse files
committed
Suppress unsubscriptable-object false positive
1 parent 9969936 commit 929c4ec

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

tests/test_checks_glyf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ def test_check_nested_components(check):
1818

1919
# We need to create a nested component. "second" has components, so setting
2020
# one of "quotedbl"'s components to "second" should do it.
21-
ttFont["glyf"]["quotedbl"].components[0].glyphName = "second"
21+
ttFont["glyf"]["quotedbl"].components[0].glyphName = "second" # pylint: disable=E1136 # false positive
2222

2323
assert_results_contain(check(ttFont), FAIL, "found-nested-components")

tests/test_checks_opentype_glyf.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ def test_check_glyf_non_transformed_duplicate_components(check):
5959
assert_PASS(check(ttFont))
6060

6161
# Set qutodbl's components to have the same x,y values
62-
ttFont["glyf"]["quotedbl"].components[0].x = 0
63-
ttFont["glyf"]["quotedbl"].components[1].x = 0
64-
ttFont["glyf"]["quotedbl"].components[0].y = 0
65-
ttFont["glyf"]["quotedbl"].components[1].y = 0
62+
ttFont["glyf"]["quotedbl"].components[0].x = 0 # pylint: disable=E1136 # false positive
63+
ttFont["glyf"]["quotedbl"].components[1].x = 0 # pylint: disable=E1136 # false positive
64+
ttFont["glyf"]["quotedbl"].components[0].y = 0 # pylint: disable=E1136 # false positive
65+
ttFont["glyf"]["quotedbl"].components[1].y = 0 # pylint: disable=E1136 # false positive
6666
assert_results_contain(check(ttFont), FAIL, "found-duplicates")

tests/test_checks_opentype_post.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ def test_check_italic_angle(check):
194194

195195
ttFont = TTFont(TEST_FILE("cairo/CairoPlay-Italic.rightslanted.ttf"))
196196
assert_PASS(check(MockFont(ttFont=ttFont, style="Italic")))
197-
ttFont["glyf"]["I"].endPtsOfContours = []
198-
ttFont["glyf"]["I"].coordinates = []
199-
ttFont["glyf"]["I"].flags = []
200-
ttFont["glyf"]["I"].numberOfContours = 0
197+
ttFont["glyf"]["I"].endPtsOfContours = [] # pylint: disable=E1136 # false positive
198+
ttFont["glyf"]["I"].coordinates = [] # pylint: disable=E1136 # false positive
199+
ttFont["glyf"]["I"].flags = [] # pylint: disable=E1136 # false positive
200+
ttFont["glyf"]["I"].numberOfContours = 0 # pylint: disable=E1136 # false positive
201201
assert_results_contain(
202202
check(MockFont(ttFont=ttFont, style="Italic")), WARN, "empty-glyphs"
203203
)

0 commit comments

Comments
 (0)