Use Python3 inheritance style for super.___init__
Avoids cases where super() argument is not enclosing class: https://help.semmle.com/wiki/display/PYTHON/First+argument+to+super%28%29+is+not+enclosing+class
This commit is contained in:
parent
63df810c5e
commit
eda4a2717e
@ -19,7 +19,7 @@ class Error(Exception):
|
|||||||
class ApproxNotFoundError(Error):
|
class ApproxNotFoundError(Error):
|
||||||
def __init__(self, curve):
|
def __init__(self, curve):
|
||||||
message = "no approximation found: %s" % curve
|
message = "no approximation found: %s" % curve
|
||||||
super(Error, self).__init__(message)
|
super().__init__(message)
|
||||||
self.curve = curve
|
self.curve = curve
|
||||||
|
|
||||||
|
|
||||||
|
@ -453,7 +453,7 @@ class MergeOutlineExtractor(CFFToCFF2OutlineExtractor):
|
|||||||
|
|
||||||
def __init__(self, pen, localSubrs, globalSubrs,
|
def __init__(self, pen, localSubrs, globalSubrs,
|
||||||
nominalWidthX, defaultWidthX, private=None):
|
nominalWidthX, defaultWidthX, private=None):
|
||||||
super(CFFToCFF2OutlineExtractor, self).__init__(pen, localSubrs,
|
super().__init__(pen, localSubrs,
|
||||||
globalSubrs, nominalWidthX, defaultWidthX, private)
|
globalSubrs, nominalWidthX, defaultWidthX, private)
|
||||||
|
|
||||||
def countHints(self):
|
def countHints(self):
|
||||||
@ -507,9 +507,7 @@ class CFF2CharStringMergePen(T2CharStringPen):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self, default_commands, glyphName, num_masters, master_idx,
|
self, default_commands, glyphName, num_masters, master_idx,
|
||||||
roundTolerance=0.5):
|
roundTolerance=0.5):
|
||||||
super(
|
super().__init__(
|
||||||
CFF2CharStringMergePen,
|
|
||||||
self).__init__(
|
|
||||||
width=None,
|
width=None,
|
||||||
glyphSet=None, CFF2=True,
|
glyphSet=None, CFF2=True,
|
||||||
roundTolerance=roundTolerance)
|
roundTolerance=roundTolerance)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user