Merge pull request #1930 from simoncozens/python3-inheritance

Use Python3 inheritance style for super.___init__
This commit is contained in:
Cosimo Lupo 2020-05-11 11:14:31 +01:00 committed by GitHub
commit 8853d56567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -19,7 +19,7 @@ class Error(Exception):
class ApproxNotFoundError(Error):
def __init__(self, curve):
message = "no approximation found: %s" % curve
super(Error, self).__init__(message)
super().__init__(message)
self.curve = curve

View File

@ -453,7 +453,7 @@ class MergeOutlineExtractor(CFFToCFF2OutlineExtractor):
def __init__(self, pen, localSubrs, globalSubrs,
nominalWidthX, defaultWidthX, private=None):
super(CFFToCFF2OutlineExtractor, self).__init__(pen, localSubrs,
super().__init__(pen, localSubrs,
globalSubrs, nominalWidthX, defaultWidthX, private)
def countHints(self):
@ -507,9 +507,7 @@ class CFF2CharStringMergePen(T2CharStringPen):
def __init__(
self, default_commands, glyphName, num_masters, master_idx,
roundTolerance=0.5):
super(
CFF2CharStringMergePen,
self).__init__(
super().__init__(
width=None,
glyphSet=None, CFF2=True,
roundTolerance=roundTolerance)