Remove tuple method parameters

They can be found through autopep8 (W690) or python-modernize.
Variables manually renamed.

This is because Python 3 does not support tuple unpacking:
http://legacy.python.org/dev/peps/pep-3113/
This commit is contained in:
Laurent Bachelier 2014-10-10 22:20:05 +02:00
commit e783f2c821
10 changed files with 22 additions and 13 deletions

View file

@ -80,8 +80,9 @@ class BNPVirtKeyboard(MappedVirtKeyboard):
MappedVirtKeyboard.__init__(self, imgdata, basepage.document, img, self.color)
self.check_symbols(self.symbols, basepage.browser.responses_dirname)
def get_symbol_coords(self, (x1, y1, x2, y2)):
def get_symbol_coords(self, coords):
# strip borders
x1, y1, x2, y2 = coords
return MappedVirtKeyboard.get_symbol_coords(self, (x1+6, y1+1, x2-6, y2-4))
def get_symbol_code(self, md5sum):
@ -96,8 +97,9 @@ class BNPVirtKeyboard(MappedVirtKeyboard):
code += self.get_symbol_code(self.symbols[c])
return code
def checksum(self, (x1, y1, x2, y2)):
def checksum(self, coords):
"""Copy of parent checksum(), but cropping (removes empty lines)"""
x1, y1, x2, y2 = coords
s = ''
for y in range(y1, min(y2 + 1, self.height)):
for x in range(x1, min(x2 + 1, self.width)):