diff --git a/Lib/ufo2ft/featureWriters/__init__.py b/Lib/ufo2ft/featureWriters/__init__.py index b085394c7..53de76876 100644 --- a/Lib/ufo2ft/featureWriters/__init__.py +++ b/Lib/ufo2ft/featureWriters/__init__.py @@ -1,5 +1,5 @@ import importlib -from inspect import isclass +from inspect import isclass, getfullargspec from ufo2ft.util import _loadPluginFromString @@ -7,10 +7,6 @@ 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 @@ -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