Skip to content

Commit

Permalink
Merge pull request #43 from robotools/removePY2
Browse files Browse the repository at this point in the history
remove all py23 and future imports
  • Loading branch information
benkiel authored Apr 8, 2023
2 parents 776df99 + 3f32438 commit d8d26fe
Show file tree
Hide file tree
Showing 12 changed files with 1 addition and 30 deletions.
3 changes: 0 additions & 3 deletions Lib/fontPens/angledMarginPen.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
from __future__ import absolute_import, print_function, division

import math

from fontTools.misc.py23 import *
from fontTools.pens.basePen import BasePen

from fontPens.penTools import getCubicPoint
Expand Down
2 changes: 0 additions & 2 deletions Lib/fontPens/digestPointPen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import, print_function, division

from fontTools.pens.pointPen import AbstractPointPen


Expand Down
2 changes: 0 additions & 2 deletions Lib/fontPens/flattenPen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import, print_function, division

from fontTools.misc.bezierTools import calcQuadraticArcLength
from fontTools.pens.basePen import BasePen

Expand Down
2 changes: 0 additions & 2 deletions Lib/fontPens/guessSmoothPointPen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import, print_function, division

import math
from fontTools.pens.pointPen import AbstractPointPen

Expand Down
2 changes: 0 additions & 2 deletions Lib/fontPens/marginPen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import, print_function, division

from fontTools.pens.basePen import BasePen
from fontTools.misc.bezierTools import splitLine, splitCubic

Expand Down
6 changes: 1 addition & 5 deletions Lib/fontPens/penTools.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
from __future__ import absolute_import, print_function, division

import math

from fontTools.misc.py23 import *
from fontTools.misc.bezierTools import calcQuadraticArcLengthC


Expand Down Expand Up @@ -140,7 +137,6 @@ def estimateCubicCurveLength(pt0, pt1, pt2, pt3, precision=10):
>>> estimateCubicCurveLength((0, 0), (50, -10), (80, 50), (120, 40), 1000)
130.4488917899906
"""

length = 0
step = 1.0 / precision
points = getCubicPoints([f * step for f in range(precision + 1)], pt0, pt1, pt2, pt3)
Expand All @@ -161,7 +157,7 @@ def estimateQuadraticCurveLength(pt0, pt1, pt2, precision=10):
>>> estimateQuadraticCurveLength((0, 0), (50, 0), (80, 0)) # collinear points
80.0
>>> estimateQuadraticCurveLength((0, 0), (50, 20), (100, 40)) # collinear points
107.70329614269009
107.70329614269008
>>> estimateQuadraticCurveLength((0, 0), (0, 100), (100, 0))
153.6861437729263
>>> estimateQuadraticCurveLength((0, 0), (50, -10), (80, 50))
Expand Down
3 changes: 0 additions & 3 deletions Lib/fontPens/printPen.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from __future__ import absolute_import, print_function, division

from fontTools.misc.py23 import *
from fontTools.pens.basePen import AbstractPen


Expand Down
3 changes: 0 additions & 3 deletions Lib/fontPens/printPointPen.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from __future__ import absolute_import, print_function, division

from fontTools.misc.py23 import *
from fontTools.pens.pointPen import AbstractPointPen


Expand Down
2 changes: 0 additions & 2 deletions Lib/fontPens/recordingPointPen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import, print_function, division

from fontTools.pens.pointPen import AbstractPointPen


Expand Down
2 changes: 0 additions & 2 deletions Lib/fontPens/thresholdPen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import, print_function, division

from fontTools.pens.basePen import AbstractPen

from fontPens.penTools import distance
Expand Down
2 changes: 0 additions & 2 deletions Lib/fontPens/thresholdPointPen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import, print_function, division

from fontTools.pens.pointPen import AbstractPointPen

from fontPens.penTools import distance
Expand Down
2 changes: 0 additions & 2 deletions Lib/fontPens/transformPointPen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import, print_function, division

from fontTools.pens.pointPen import AbstractPointPen


Expand Down

0 comments on commit d8d26fe

Please sign in to comment.