Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Tests/test_imageqt.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def tearDown(self):

class PillowQPixmapTestCase(PillowQtTestCase):
def setUp(self):
PillowQtTestCase.setUp(self)
super().setUp()
try:
if ImageQt.qt_version == "5":
from PyQt5.QtGui import QGuiApplication
Expand All @@ -37,7 +37,7 @@ def setUp(self):
self.app = QGuiApplication([])

def tearDown(self):
PillowQtTestCase.tearDown(self)
super().tearDown()
self.app.quit()


Expand Down
3 changes: 1 addition & 2 deletions src/PIL/BdfFontFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ def bdf_char(f):

class BdfFontFile(FontFile.FontFile):
def __init__(self, fp):

FontFile.FontFile.__init__(self)
super().__init__()

s = fp.readline()
if s[:13] != b"STARTFONT 2.1":
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/ImageFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ImageFile(Image.Image):
"Base class for image file format handlers."

def __init__(self, fp=None, filename=None):
Image.Image.__init__(self)
super().__init__()

self._min_frame = 0

Expand Down
3 changes: 1 addition & 2 deletions src/PIL/ImageQt.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ def __init__(self, im):
# buffer, so this buffer has to hang on for the life of the image.
# Fixes https://github.com/python-pillow/Pillow/issues/1370
self.__data = im_data["data"]
QImage.__init__(
self,
super().__init__(
self.__data,
im_data["im"].size[0],
im_data["im"].size[1],
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/ImageTk.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def __init__(self, master, im):
self.image = BitmapImage(im, foreground="white", master=master)
else:
self.image = PhotoImage(im, master=master)
tkinter.Label.__init__(self, master, image=self.image, bg="black", bd=0)
super().__init__(master, image=self.image, bg="black", bd=0)

if not tkinter._default_root:
raise IOError("tkinter not initialized")
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/ImageWin.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def __init__(self, image, title="PIL"):
image = Dib(image)
self.image = image
width, height = image.size
Window.__init__(self, title, width=width, height=height)
super().__init__(title, width=width, height=height)

def ui_handle_repair(self, dc, x0, y0, x1, y1):
self.image.draw(dc, (x0, y0, x1, y1))
2 changes: 1 addition & 1 deletion src/PIL/PcfFontFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(self, fp):
if magic != PCF_MAGIC:
raise SyntaxError("not a PCF file")

FontFile.FontFile.__init__(self)
super().__init__()

count = l32(fp.read(4))
self.toc = {}
Expand Down
3 changes: 1 addition & 2 deletions src/PIL/PngImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,7 @@ def add_text(self, key, value, zip=False):

class PngStream(ChunkStream):
def __init__(self, fp):

ChunkStream.__init__(self, fp)
super().__init__(fp)

# local copies of Image attributes
self.im_info = {}
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/TarIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, tarfile, file):
self.fh.seek((size + 511) & (~511), io.SEEK_CUR)

# Open region
ContainerIO.ContainerIO.__init__(self, self.fh, self.fh.tell(), size)
super().__init__(self.fh, self.fh.tell(), size)

# Context manager support
def __enter__(self):
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/TiffImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ class ImageFileDirectory_v1(ImageFileDirectory_v2):
"""

def __init__(self, *args, **kwargs):
ImageFileDirectory_v2.__init__(self, *args, **kwargs)
super().__init__(*args, **kwargs)
self._legacy_api = True

tags = property(lambda self: self._tags_v1)
Expand Down