Fix new pep8 ambiguous name warning

This commit is contained in:
Kovid Goyal
2017-10-23 17:33:57 +05:30
parent 4e7b957cc7
commit 8b54df31ef
3 changed files with 63 additions and 63 deletions

View File

@@ -60,7 +60,7 @@ def load_helpers(self):
s = self.create_screen()
g = s.grman
def l(payload, **kw):
def pl(payload, **kw):
kw.setdefault('i', 1)
cmd = ','.join('%s=%s' % (k, v) for k, v in kw.items())
res = send_command(s, cmd, payload)
@@ -71,7 +71,7 @@ def load_helpers(self):
payload = payload.encode('utf-8')
data = kw.pop('expecting_data', payload)
cid = kw.setdefault('i', 1)
self.ae('OK', l(payload, **kw))
self.ae('OK', pl(payload, **kw))
img = g.image_for_client_id(cid)
self.ae(img['client_id'], cid)
self.ae(img['data'], data)
@@ -80,7 +80,7 @@ def load_helpers(self):
self.ae(img['is_4byte_aligned'], kw.get('f') != 24)
return img
return s, g, l, sl
return s, g, pl, sl
def put_helpers(self, cw, ch):
@@ -218,14 +218,14 @@ class TestGraphics(BaseTest):
self.ae(l[0]['group_count'], 1)
self.ae(s.cursor.x, 1), self.ae(s.cursor.y, 0)
put_ref(s, num_cols=s.columns, x_off=2, y_off=1, width=3, height=5, cell_x_off=3, cell_y_off=1, z=-1)
l = layers(s)
self.ae(len(l), 2)
rect_eq(l[0]['src_rect'], 2 / 10, 1 / 20, (2 + 3) / 10, (1 + 5)/20)
l2 = layers(s)
self.ae(len(l2), 2)
rect_eq(l2[0]['src_rect'], 2 / 10, 1 / 20, (2 + 3) / 10, (1 + 5)/20)
left, top = -1 + dx + 3 * dx / cw, 1 - 1 * dy / ch
rect_eq(l[0]['dest_rect'], left, top, -1 + (1 + s.columns) * dx, top - dy * 5 / ch)
rect_eq(l[1]['src_rect'], 0, 0, 1, 1)
rect_eq(l[1]['dest_rect'], -1, 1, -1 + dx, 1 - dy)
self.ae(l[0]['group_count'], 1), self.ae(l[1]['group_count'], 1)
rect_eq(l2[0]['dest_rect'], left, top, -1 + (1 + s.columns) * dx, top - dy * 5 / ch)
rect_eq(l2[1]['src_rect'], 0, 0, 1, 1)
rect_eq(l2[1]['dest_rect'], -1, 1, -1 + dx, 1 - dy)
self.ae(l2[0]['group_count'], 1), self.ae(l2[1]['group_count'], 1)
self.ae(s.cursor.x, 0), self.ae(s.cursor.y, 1)
def test_gr_scroll(self):