Skip to content

Commit

Permalink
Fix if-else lint
Browse files Browse the repository at this point in the history
  • Loading branch information
madig committed Aug 21, 2024
1 parent ed483c1 commit f0f1eab
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Lib/ufo2ft/featureWriters/kernFeatureWriter2.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,22 +610,20 @@ def split_base_and_mark_pairs(
if pair.firstIsClass:
side1Bases = tuple(glyph for glyph in pair.side1 if glyph not in marks)
side1Marks = tuple(glyph for glyph in pair.side1 if glyph in marks)
elif pair.side1 in marks:
side1Marks = pair.side1
else:
if pair.side1 in marks:
side1Marks = pair.side1
else:
side1Bases = pair.side1
side1Bases = pair.side1

side2Bases: tuple[str, ...] | str | None = None
side2Marks: tuple[str, ...] | str | None = None
if pair.secondIsClass:
side2Bases = tuple(glyph for glyph in pair.side2 if glyph not in marks)
side2Marks = tuple(glyph for glyph in pair.side2 if glyph in marks)
elif pair.side2 in marks:
side2Marks = pair.side2
else:
if pair.side2 in marks:
side2Marks = pair.side2
else:
side2Bases = pair.side2
side2Bases = pair.side2

if side1Bases and side2Bases: # base-to-base
basePairs.append(KerningPair(side1Bases, side2Bases, value=pair.value))
Expand Down

0 comments on commit f0f1eab

Please sign in to comment.