diff options
author | Philip Paquette <pcpaquette@gmail.com> | 2018-12-14 16:53:08 -0500 |
---|---|---|
committer | Philip Paquette <pcpaquette@gmail.com> | 2019-04-18 11:22:30 -0400 |
commit | 76d92f8e3a2fb12d7dad133ca72832f4e1c5c6e3 (patch) | |
tree | 28a8583cf47dea46e638638b9a908e495b3fd11f | |
parent | 6bf4eff9344064e3d69debda4fbc1281342377a3 (diff) |
Upgraded pylint to v2.2.0
-rw-r--r-- | diplomacy/engine/message.py | 3 | ||||
-rw-r--r-- | diplomacy/engine/renderer.py | 22 | ||||
-rw-r--r-- | diplomacy/tests/test_datc_no_expand.py | 3 | ||||
-rw-r--r-- | diplomacy/utils/jsonable.py | 1 | ||||
-rw-r--r-- | diplomacy/utils/network_data.py | 1 | ||||
-rw-r--r-- | requirements_dev.txt | 2 |
6 files changed, 16 insertions, 16 deletions
diff --git a/diplomacy/engine/message.py b/diplomacy/engine/message.py index 2d6d644..150efd4 100644 --- a/diplomacy/engine/message.py +++ b/diplomacy/engine/message.py @@ -76,8 +76,7 @@ class Message(Jsonable): super(Message, self).__init__(**kwargs) def __str__(self): - return '[%d/%s/%s->%s](%s)' % ( - self.time_sent, self.phase, self.sender, self.recipient, self.message) + return '[%d/%s/%s->%s](%s)' % (self.time_sent or 0, self.phase, self.sender, self.recipient, self.message) def __hash__(self): return hash(self.time_sent) 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) diff --git a/diplomacy/tests/test_datc_no_expand.py b/diplomacy/tests/test_datc_no_expand.py index ee156f4..0e7711f 100644 --- a/diplomacy/tests/test_datc_no_expand.py +++ b/diplomacy/tests/test_datc_no_expand.py @@ -40,7 +40,6 @@ class TestDATCNoExpand(RootDATC): I prefer that an attempt is made to the only possible coast, the north coast of Spain. """ # Expected to failed - pass def test_6_b_9(self): """ 6.B.9. TEST CASE, SUPPORTING WITH WRONG COAST @@ -83,7 +82,6 @@ class TestDATCNoExpand(RootDATC): I prefer that a move will be attempted. """ # Expected to fail - pass def test_6_b_12(self): """ 6.B.12. TEST CASE, ARMY MOVEMENT WITH COASTAL SPECIFICATION @@ -94,4 +92,3 @@ class TestDATCNoExpand(RootDATC): I prefer that a move will be attempted. """ # Expected to fail - pass diff --git a/diplomacy/utils/jsonable.py b/diplomacy/utils/jsonable.py index 5e558ee..0ce1a21 100644 --- a/diplomacy/utils/jsonable.py +++ b/diplomacy/utils/jsonable.py @@ -98,7 +98,6 @@ class Jsonable(): :param json_dict: a JSON dictionary to be parsed. :type json_dict: dict """ - pass @classmethod def from_dict(cls, json_dict): diff --git a/diplomacy/utils/network_data.py b/diplomacy/utils/network_data.py index 48b285a..18e3869 100644 --- a/diplomacy/utils/network_data.py +++ b/diplomacy/utils/network_data.py @@ -61,7 +61,6 @@ class NetworkData(Jsonable): @classmethod def validate_params(cls): """ Called when getting model to validate parameters. Called once per class. """ - pass @classmethod def build_model(cls): diff --git a/requirements_dev.txt b/requirements_dev.txt index a62a5fa..59526b7 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,5 +1,5 @@ -e . -r requirements.txt -pylint>=2.0.0 +pylint>=2.2.0 pytest pytest-xdist |