vici: Fix several PEP8 issues
authorTobias Brunner <tobias@strongswan.org>
Tue, 14 Jan 2020 10:03:07 +0000 (11:03 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 14 Jan 2020 14:26:32 +0000 (15:26 +0100)
src/libcharon/plugins/vici/python/vici/command_wrappers.py
src/libcharon/plugins/vici/python/vici/test/test_protocol.py

index 8a0aa25..a2e8fa9 100644 (file)
@@ -232,7 +232,6 @@ class CommandWrappers(object):
         """
         self.request("load-shared", secret)
 
-
     def unload_shared(self, identifier):
         """Unload a previously loaded shared secret by its unique identifier.
 
index a1f202d..7ae1f2f 100644 (file)
@@ -70,17 +70,17 @@ class TestMessage(object):
     ser_kv_zero = b"\x03\x0azerolength\x00\x00"
 
     # deserialized messages holding a section
-    des_sec_single = { "section": {} }
-    des_sec_nested = { "outer": { "subsection": {} } }
+    des_sec_single = {"section": {}}
+    des_sec_nested = {"outer": {"subsection": {}}}
 
     # deserialized messages holding a list
-    des_list_0_item = { "empty": [] }
-    des_list_1_item = { "l": [ b"e1" ] }
-    des_list_2_item = { "l": [ b"e1", b"e2" ] }
+    des_list_0_item = {"empty": []}
+    des_list_1_item = {"l": [b"e1"]}
+    des_list_2_item = {"l": [b"e1", b"e2"]}
 
     # deserialized messages with key value pairs
-    des_kv_pair = { "key": b"value" }
-    des_kv_zero = { "zerolength": b"" }
+    des_kv_pair = {"key": b"value"}
+    des_kv_zero = {"zerolength": b""}
 
     def test_section_serialization(self):
         assert Message.serialize(self.des_sec_single) == self.ser_sec_single
@@ -131,7 +131,7 @@ class TestMessage(object):
                 "sub-section": {
                     "key2": b"value2",
                 },
-                "list1": [ "item1", "item2" ],
+                "list1": ["item1", "item2"],
             },
         }
         serialized_message = FiniteStream(Message.serialize(message))
@@ -141,4 +141,4 @@ class TestMessage(object):
         deserialized_section = deserialized_message["section1"]
         assert deserialized_message["key1"] == b"value1"
         assert deserialized_section["sub-section"]["key2"] == b"value2"
-        assert deserialized_section["list1"] == [ b"item1", b"item2" ]
+        assert deserialized_section["list1"] == [b"item1", b"item2"]