Improved mypy checks

This commit is contained in:
Cédric Bonhomme 2019-12-15 21:51:39 +01:00
parent c0abda31bc
commit a61a7916a3
No known key found for this signature in database
GPG key ID: A1CB94DE57B7A70D
2 changed files with 15 additions and 11 deletions

View file

@ -25,6 +25,7 @@ __date__ = "$Date: 2010/10/01 $"
__revision__ = "$Date: 2016/08/26 $"
__license__ = "GPLv3"
import typing
import operator
from PIL import Image
@ -37,7 +38,7 @@ def steganalyse(img):
"""
encoded = img.copy()
width, height = img.size
colours_counter = Counter() # type: Counter[int]
colours_counter = Counter() # type: typing.Counter[int]
for row in range(height):
for col in range(width):
r, g, b = img.getpixel((col, row))