diff --git a/Lib/fontTools/cu2qu/cu2qu.py b/Lib/fontTools/cu2qu/cu2qu.py index e620b48a5..c0d4cf947 100644 --- a/Lib/fontTools/cu2qu/cu2qu.py +++ b/Lib/fontTools/cu2qu/cu2qu.py @@ -17,13 +17,10 @@ try: import cython - - COMPILED = cython.compiled except (AttributeError, ImportError): # if cython not installed, use mock module with no-op decorators and types from fontTools.misc import cython - - COMPILED = False +COMPILED = cython.compiled import math diff --git a/Lib/fontTools/misc/bezierTools.py b/Lib/fontTools/misc/bezierTools.py index 5411ff99f..1b37ade8d 100644 --- a/Lib/fontTools/misc/bezierTools.py +++ b/Lib/fontTools/misc/bezierTools.py @@ -9,13 +9,10 @@ from collections import namedtuple try: import cython - - COMPILED = cython.compiled except (AttributeError, ImportError): # if cython not installed, use mock module with no-op decorators and types from fontTools.misc import cython - - COMPILED = False +COMPILED = cython.compiled EPSILON = 1e-9 diff --git a/Lib/fontTools/misc/symfont.py b/Lib/fontTools/misc/symfont.py index 3a8819c77..4dea41840 100644 --- a/Lib/fontTools/misc/symfont.py +++ b/Lib/fontTools/misc/symfont.py @@ -121,13 +121,10 @@ def printGreenPen(penName, funcs, file=sys.stdout, docstring=None): """from fontTools.pens.basePen import BasePen, OpenContourError try: import cython - - COMPILED = cython.compiled except (AttributeError, ImportError): # if cython not installed, use mock module with no-op decorators and types from fontTools.misc import cython - - COMPILED = False +COMPILED = cython.compiled __all__ = ["%s"] diff --git a/Lib/fontTools/pens/momentsPen.py b/Lib/fontTools/pens/momentsPen.py index 2afb8fdbd..77ead9fc3 100644 --- a/Lib/fontTools/pens/momentsPen.py +++ b/Lib/fontTools/pens/momentsPen.py @@ -2,13 +2,10 @@ from fontTools.pens.basePen import BasePen, OpenContourError try: import cython - - COMPILED = cython.compiled except (AttributeError, ImportError): # if cython not installed, use mock module with no-op decorators and types from fontTools.misc import cython - - COMPILED = False +COMPILED = cython.compiled __all__ = ["MomentsPen"] diff --git a/Lib/fontTools/qu2cu/qu2cu.py b/Lib/fontTools/qu2cu/qu2cu.py index 97a665f63..8fe3e18b0 100644 --- a/Lib/fontTools/qu2cu/qu2cu.py +++ b/Lib/fontTools/qu2cu/qu2cu.py @@ -18,13 +18,10 @@ try: import cython - - COMPILED = cython.compiled except (AttributeError, ImportError): # if cython not installed, use mock module with no-op decorators and types from fontTools.misc import cython - - COMPILED = False +COMPILED = cython.compiled from fontTools.misc.bezierTools import splitCubicAtTC from collections import namedtuple diff --git a/Lib/fontTools/varLib/iup.py b/Lib/fontTools/varLib/iup.py index 76555f350..41be6ba4f 100644 --- a/Lib/fontTools/varLib/iup.py +++ b/Lib/fontTools/varLib/iup.py @@ -1,12 +1,9 @@ try: import cython - - COMPILED = cython.compiled except (AttributeError, ImportError): # if cython not installed, use mock module with no-op decorators and types from fontTools.misc import cython - - COMPILED = False +COMPILED = cython.compiled from typing import ( Sequence,