Skip to content

Commit

Permalink
featureWriters: use py3 getfullargspec
Browse files Browse the repository at this point in the history
  • Loading branch information
anthrotype committed Mar 1, 2021
1 parent d15836d commit 357f920
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Lib/ufo2ft/featureWriters/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import importlib
from inspect import isclass
from inspect import isclass, getfullargspec

from ufo2ft.util import _loadPluginFromString

from .baseFeatureWriter import BaseFeatureWriter
from .kernFeatureWriter import KernFeatureWriter
from .markFeatureWriter import MarkFeatureWriter

try:
from inspect import getfullargspec as getargspec # PY3
except ImportError:
from inspect import getargspec # PY2

import logging

Expand Down Expand Up @@ -45,7 +41,7 @@ def write(self, font, feaFile, compiler=None)
if not hasattr(klass, "write"):
logger.error("%r does not have a required 'write' method", klass)
return False
if getargspec(klass.write).args != getargspec(BaseFeatureWriter.write).args:
if getfullargspec(klass.write).args != getfullargspec(BaseFeatureWriter.write).args:
logger.error("%r 'write' method has incorrect signature", klass)
return False
return True
Expand Down

0 comments on commit 357f920

Please sign in to comment.