Skip to content

Commit

Permalink
Search the object's MRO for visitors
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens authored and behdad committed Jul 3, 2024
1 parent ee56bb0 commit 3546b9f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Lib/fontTools/misc/visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ def _visitorsFor(celf, thing, _default={}):
if _visitors is None:
break

m = celf._visitors.get(typ, None)
if m is not None:
return m
for base in typ.mro():
m = celf._visitors.get(base, None)
if m is not None:
return m

return _default

Expand Down

0 comments on commit 3546b9f

Please sign in to comment.