diff --git a/src/PIL/ImageGrab.py b/src/PIL/ImageGrab.py index f52dd301d14..f16e9554433 100644 --- a/src/PIL/ImageGrab.py +++ b/src/PIL/ImageGrab.py @@ -84,7 +84,7 @@ def grab( fh, filepath = tempfile.mkstemp(".png") os.close(fh) subprocess.call(["gnome-screenshot", "-f", filepath]) - im: Image.Image = Image.open(filepath) + im: Image.Image = Image.open(filepath) # type: ignore[no-redef, unused-ignore] im.load() os.unlink(filepath) if bbox: