From 76d92f8e3a2fb12d7dad133ca72832f4e1c5c6e3 Mon Sep 17 00:00:00 2001 From: Philip Paquette Date: Fri, 14 Dec 2018 16:53:08 -0500 Subject: Upgraded pylint to v2.2.0 --- diplomacy/engine/renderer.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'diplomacy/engine/renderer.py') diff --git a/diplomacy/engine/renderer.py b/diplomacy/engine/renderer.py index 8b5e10c..c6369c4 100644 --- a/diplomacy/engine/renderer.py +++ b/diplomacy/engine/renderer.py @@ -573,19 +573,25 @@ class Renderer(): path_with_shadow = xml_map.createElement('path') path_with_shadow.setAttribute('class', 'shadowdash') - path_with_shadow.setAttribute('d', 'M {},{} C {},{} {},{} {},{}'.format(loc_x, loc_y, - src_loc_x, src_loc_y, - src_loc_x, src_loc_y, - dest_loc_x, dest_loc_y)) + path_with_shadow.setAttribute('d', 'M {x},{y} C {src_x},{src_y} {src_x},{src_y} {dest_x},{dest_y}' + .format(x=loc_x, + y=loc_y, + src_x=src_loc_x, + src_y=src_loc_y, + dest_x=dest_loc_x, + dest_y=dest_loc_y)) path_with_arrow = xml_map.createElement('path') path_with_arrow.setAttribute('class', 'supportorder') path_with_arrow.setAttribute('stroke', self.metadata['color'][power_name]) path_with_arrow.setAttribute('marker-end', 'url(#arrow)') - path_with_arrow.setAttribute('d', 'M {},{} C {},{} {},{} {},{}'.format(loc_x, loc_y, - src_loc_x, src_loc_y, - src_loc_x, src_loc_y, - dest_loc_x, dest_loc_y)) + path_with_arrow.setAttribute('d', 'M {x},{y} C {src_x},{src_y} {src_x},{src_y} {dest_x},{dest_y}' + .format(x=loc_x, + y=loc_y, + src_x=src_loc_x, + src_y=src_loc_y, + dest_x=dest_loc_x, + dest_y=dest_loc_y)) # Inserting g_node.appendChild(path_with_shadow) -- cgit v1.2.3