This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git

commit e1bcd9cc3b5a14fc12a12cac991851b8b4b67bb9
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Sun Apr 14 21:35:55 2024 +0200

    Reformat code with latest version of black.
---
 libcloud/common/exceptions.py                  |  1 -
 libcloud/common/openstack.py                   |  1 -
 libcloud/compute/drivers/azure.py              |  5 --
 libcloud/compute/drivers/dimensiondata.py      | 70 +++++++++++-----------
 libcloud/compute/drivers/ecs.py                |  1 -
 libcloud/compute/drivers/equinixmetal.py       |  6 +-
 libcloud/compute/drivers/nttcis.py             | 82 +++++++++++++-------------
 libcloud/compute/drivers/vcloud.py             | 12 +---
 libcloud/loadbalancer/drivers/dimensiondata.py |  6 +-
 libcloud/loadbalancer/drivers/nttcis.py        |  6 +-
 libcloud/test/compute/test_abiquo.py           |  1 -
 libcloud/test/compute/test_azure_arm.py        |  8 ++-
 libcloud/test/compute/test_gandi.py            |  2 -
 libcloud/test/compute/test_opennebula.py       | 12 ----
 libcloud/test/compute/test_vcloud.py           |  1 -
 libcloud/test/container/test_lxd.py            |  1 -
 16 files changed, 94 insertions(+), 121 deletions(-)

diff --git a/libcloud/common/exceptions.py b/libcloud/common/exceptions.py
index 12c4f96f9..6c6bcfa18 100644
--- a/libcloud/common/exceptions.py
+++ b/libcloud/common/exceptions.py
@@ -20,7 +20,6 @@ __all__ = ["BaseHTTPError", "RateLimitReachedError", 
"exception_from_message"]
 
 
 class BaseHTTPError(Exception):
-
     """
     The base exception class for all HTTP related exceptions.
     """
diff --git a/libcloud/common/openstack.py b/libcloud/common/openstack.py
index 8f0702de3..6c363316b 100644
--- a/libcloud/common/openstack.py
+++ b/libcloud/common/openstack.py
@@ -57,7 +57,6 @@ __all__ = [
 
 
 class OpenStackBaseConnection(ConnectionUserAndKey):
-
     """
     Base class for OpenStack connections.
 
diff --git a/libcloud/compute/drivers/azure.py 
b/libcloud/compute/drivers/azure.py
index b5c29a18f..d424f357d 100644
--- a/libcloud/compute/drivers/azure.py
+++ b/libcloud/compute/drivers/azure.py
@@ -2577,7 +2577,6 @@ Borrowed from the Azure SDK for Python.
 
 
 class WindowsAzureData:
-
     """
     This is the base of data class.
     It is only used to check whether it is instance or not.
@@ -2674,7 +2673,6 @@ class Credentials(WindowsAzureData):
 
 
 class CertificateSetting(WindowsAzureData):
-
     """
     Initializes a certificate setting.
 
@@ -3141,7 +3139,6 @@ class _Base64String(str):
 
 
 class _ListOf(list):
-
     """
     A list which carries with it the type that's expected to go in it.
     Used for deserializaion and construction of the lists
@@ -3157,7 +3154,6 @@ class _ListOf(list):
 
 
 class ScalarListOf(list):
-
     """
     A list of scalar types which carries with it the type that's
     expected to go in it along with its xml element name.
@@ -3171,7 +3167,6 @@ class ScalarListOf(list):
 
 
 class _DictOf(dict):
-
     """
     A dict which carries with it the xml element names for key,val.
     Used for deserializaion and construction of the lists
diff --git a/libcloud/compute/drivers/dimensiondata.py 
b/libcloud/compute/drivers/dimensiondata.py
index b06d59f85..31660cec3 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -648,9 +648,9 @@ class DimensionDataNodeDriver(NodeDriver):
                         ET.SubElement(additional_nic, "vlanId").text = vlan_id
 
                     if nic.network_adapter_name is not None:
-                        ET.SubElement(
-                            additional_nic, "networkAdapter"
-                        ).text = nic.network_adapter_name
+                        ET.SubElement(additional_nic, "networkAdapter").text = 
(
+                            nic.network_adapter_name
+                        )
             elif ex_additional_nics is not None:
                 raise TypeError("ex_additional_NICs must be None or 
tuple/list")
 
@@ -955,9 +955,9 @@ class DimensionDataNodeDriver(NodeDriver):
                 ET.SubElement(import_image_elem, "urn:datacenterId").text = 
datacenter_id
 
             if is_guest_os_customization is not None:
-                ET.SubElement(
-                    import_image_elem, "urn:guestOsCustomization"
-                ).text = is_guest_os_customization
+                ET.SubElement(import_image_elem, 
"urn:guestOsCustomization").text = (
+                    is_guest_os_customization
+                )
 
             if len(tagkey_name_value_dictionaries) > 0:
                 for k, v in tagkey_name_value_dictionaries.items():
@@ -1847,9 +1847,9 @@ class DimensionDataNodeDriver(NodeDriver):
         positions_with_rule = ("BEFORE", "AFTER")
 
         create_node = ET.Element("createFirewallRule", {"xmlns": TYPES_URN})
-        ET.SubElement(
-            create_node, "networkDomainId"
-        ).text = self._network_domain_to_network_domain_id(network_domain)
+        ET.SubElement(create_node, "networkDomainId").text = (
+            self._network_domain_to_network_domain_id(network_domain)
+        )
         ET.SubElement(create_node, "name").text = rule.name
         ET.SubElement(create_node, "action").text = rule.action
         ET.SubElement(create_node, "ipVersion").text = rule.ip_version
@@ -2514,9 +2514,9 @@ class DimensionDataNodeDriver(NodeDriver):
                 ET.SubElement(clone_server_elem, "clusterId").text = cluster_id
 
             if is_guest_Os_Customization is not None:
-                ET.SubElement(
-                    clone_server_elem, "guestOsCustomization"
-                ).text = is_guest_Os_Customization
+                ET.SubElement(clone_server_elem, "guestOsCustomization").text 
= (
+                    is_guest_Os_Customization
+                )
 
             if tag_key_id is not None:
                 tag_elem = ET.SubElement(clone_server_elem, "tagById")
@@ -3179,9 +3179,9 @@ class DimensionDataNodeDriver(NodeDriver):
             )
 
         create_ip_address_list = ET.Element("createIpAddressList", {"xmlns": 
TYPES_URN})
-        ET.SubElement(
-            create_ip_address_list, "networkDomainId"
-        ).text = self._network_domain_to_network_domain_id(ex_network_domain)
+        ET.SubElement(create_ip_address_list, "networkDomainId").text = (
+            self._network_domain_to_network_domain_id(ex_network_domain)
+        )
 
         ET.SubElement(create_ip_address_list, "name").text = name
 
@@ -3203,9 +3203,9 @@ class DimensionDataNodeDriver(NodeDriver):
                 ip_address.set("prefixSize", ip.prefix_size)
 
         if child_ip_address_list is not None:
-            ET.SubElement(
-                create_ip_address_list, "childIpAddressListId"
-            ).text = 
self._child_ip_address_list_to_child_ip_address_list_id(child_ip_address_list)
+            ET.SubElement(create_ip_address_list, "childIpAddressListId").text 
= (
+                
self._child_ip_address_list_to_child_ip_address_list_id(child_ip_address_list)
+            )
 
         response = self.connection.request_with_orgId_api_2(
             "network/createIpAddressList",
@@ -3301,9 +3301,9 @@ class DimensionDataNodeDriver(NodeDriver):
                 ip_address.set("prefixSize", ip.prefix_size)
 
         if child_ip_address_lists is not None:
-            ET.SubElement(
-                edit_ip_address_list, "childIpAddressListId"
-            ).text = 
self._child_ip_address_list_to_child_ip_address_list_id(child_ip_address_lists)
+            ET.SubElement(edit_ip_address_list, "childIpAddressListId").text = 
(
+                
self._child_ip_address_list_to_child_ip_address_list_id(child_ip_address_lists)
+            )
         else:
             ET.SubElement(edit_ip_address_list, "childIpAddressListId", 
{"xsi:nil": "true"})
 
@@ -3499,9 +3499,9 @@ class DimensionDataNodeDriver(NodeDriver):
         :rtype: ``bool``
         """
         new_port_list = ET.Element("createPortList", {"xmlns": TYPES_URN})
-        ET.SubElement(
-            new_port_list, "networkDomainId"
-        ).text = self._network_domain_to_network_domain_id(ex_network_domain)
+        ET.SubElement(new_port_list, "networkDomainId").text = (
+            self._network_domain_to_network_domain_id(ex_network_domain)
+        )
 
         ET.SubElement(new_port_list, "name").text = name
 
@@ -3516,9 +3516,9 @@ class DimensionDataNodeDriver(NodeDriver):
 
         if child_portlist_list is not None:
             for child in child_portlist_list:
-                ET.SubElement(
-                    new_port_list, "childPortListId"
-                ).text = self._child_port_list_to_child_port_list_id(child)
+                ET.SubElement(new_port_list, "childPortListId").text = (
+                    self._child_port_list_to_child_port_list_id(child)
+                )
 
         response = self.connection.request_with_orgId_api_2(
             "network/createPortList", method="POST", 
data=ET.tostring(new_port_list)
@@ -3599,9 +3599,9 @@ class DimensionDataNodeDriver(NodeDriver):
 
         if child_portlist_list is not None:
             for child in child_portlist_list:
-                ET.SubElement(
-                    existing_port_address_list, "childPortListId"
-                ).text = self._child_port_list_to_child_port_list_id(child)
+                ET.SubElement(existing_port_address_list, 
"childPortListId").text = (
+                    self._child_port_list_to_child_port_list_id(child)
+                )
         else:
             ET.SubElement(existing_port_address_list, "childPortListId", 
{"xsi:nil": "true"})
 
@@ -4367,11 +4367,11 @@ class DimensionDataNodeDriver(NodeDriver):
             "description": findtext(element, "description", TYPES_URN),
             "sourceImageId": findtext(element, "sourceImageId", TYPES_URN),
             "networkId": findtext(element, "networkId", TYPES_URN),
-            "networkDomainId": element.find(fixxpath("networkInfo", 
TYPES_URN)).get(
-                "networkDomainId"
-            )
-            if has_network_info
-            else None,
+            "networkDomainId": (
+                element.find(fixxpath("networkInfo", 
TYPES_URN)).get("networkDomainId")
+                if has_network_info
+                else None
+            ),
             "datacenterId": element.get("datacenterId"),
             "deployedTime": findtext(element, "createTime", TYPES_URN),
             "cpu": cpu_spec,
diff --git a/libcloud/compute/drivers/ecs.py b/libcloud/compute/drivers/ecs.py
index a1bf742e7..fa437b933 100644
--- a/libcloud/compute/drivers/ecs.py
+++ b/libcloud/compute/drivers/ecs.py
@@ -192,7 +192,6 @@ class ECSSecurityGroup:
 
 
 class ECSSecurityGroupAttribute:
-
     """
     Security group attribute.
     """
diff --git a/libcloud/compute/drivers/equinixmetal.py 
b/libcloud/compute/drivers/equinixmetal.py
index 6d48fcada..9458d256c 100644
--- a/libcloud/compute/drivers/equinixmetal.py
+++ b/libcloud/compute/drivers/equinixmetal.py
@@ -89,9 +89,9 @@ class EquinixMetalConnection(ConnectionKey):
         """
         headers["Content-Type"] = "application/json"
         headers["X-Auth-Token"] = self.key
-        headers[
-            "X-Consumer-Token"
-        ] = "kcrhMn7hwG8Ceo2hAhGFa2qpxLBvVHxEjS9ue8iqmsNkeeB2iQgMq4dNc1893pYu"
+        headers["X-Consumer-Token"] = (
+            "kcrhMn7hwG8Ceo2hAhGFa2qpxLBvVHxEjS9ue8iqmsNkeeB2iQgMq4dNc1893pYu"
+        )
 
         return headers
 
diff --git a/libcloud/compute/drivers/nttcis.py 
b/libcloud/compute/drivers/nttcis.py
index 0c980cb82..d90574afb 100644
--- a/libcloud/compute/drivers/nttcis.py
+++ b/libcloud/compute/drivers/nttcis.py
@@ -652,9 +652,9 @@ class NttCisNodeDriver(NodeDriver):
                         ET.SubElement(additional_nic, "vlanId").text = vlan_id
 
                     if nic.network_adapter_name is not None:
-                        ET.SubElement(
-                            additional_nic, "networkAdapter"
-                        ).text = nic.network_adapter_name
+                        ET.SubElement(additional_nic, "networkAdapter").text = 
(
+                            nic.network_adapter_name
+                        )
             elif ex_additional_nics is not None:
                 raise TypeError("ex_additional_NICs must be None or 
tuple/list")
 
@@ -1004,9 +1004,9 @@ class NttCisNodeDriver(NodeDriver):
                 ET.SubElement(import_image_elem, "urn:datacenterId").text = 
datacenter_id
 
             if is_guest_os_customization is not None:
-                ET.SubElement(
-                    import_image_elem, "urn:guestOsCustomization"
-                ).text = is_guest_os_customization
+                ET.SubElement(import_image_elem, 
"urn:guestOsCustomization").text = (
+                    is_guest_os_customization
+                )
 
             if (
                 tagkey_name_value_dictionaries is not None
@@ -2273,9 +2273,9 @@ class NttCisNodeDriver(NodeDriver):
         positions_with_rule = ("BEFORE", "AFTER")
 
         create_node = ET.Element("createFirewallRule", {"xmlns": TYPES_URN})
-        ET.SubElement(
-            create_node, "networkDomainId"
-        ).text = self._network_domain_to_network_domain_id(network_domain)
+        ET.SubElement(create_node, "networkDomainId").text = (
+            self._network_domain_to_network_domain_id(network_domain)
+        )
         ET.SubElement(create_node, "name").text = name
         ET.SubElement(create_node, "action").text = action
         ET.SubElement(create_node, "ipVersion").text = ip_version
@@ -3032,9 +3032,9 @@ class NttCisNodeDriver(NodeDriver):
             ET.SubElement(clone_server_elem, "clusterId").text = cluster_id
 
         if is_guest_Os_Customization is not None:
-            ET.SubElement(
-                clone_server_elem, "guestOsCustomization"
-            ).text = is_guest_Os_Customization
+            ET.SubElement(clone_server_elem, "guestOsCustomization").text = (
+                is_guest_Os_Customization
+            )
 
         if tag_key_id is not None:
             tag_elem = ET.SubElement(clone_server_elem, "tagById")
@@ -3724,9 +3724,9 @@ class NttCisNodeDriver(NodeDriver):
             )
 
         create_ip_address_list = ET.Element("createIpAddressList", {"xmlns": 
TYPES_URN})
-        ET.SubElement(
-            create_ip_address_list, "networkDomainId"
-        ).text = self._network_domain_to_network_domain_id(ex_network_domain)
+        ET.SubElement(create_ip_address_list, "networkDomainId").text = (
+            self._network_domain_to_network_domain_id(ex_network_domain)
+        )
 
         ET.SubElement(create_ip_address_list, "name").text = name
 
@@ -3748,9 +3748,9 @@ class NttCisNodeDriver(NodeDriver):
                 ip_address.set("prefixSize", ip.prefix_size)
 
         if child_ip_address_list is not None:
-            ET.SubElement(
-                create_ip_address_list, "childIpAddressListId"
-            ).text = 
self._child_ip_address_list_to_child_ip_address_list_id(child_ip_address_list)
+            ET.SubElement(create_ip_address_list, "childIpAddressListId").text 
= (
+                
self._child_ip_address_list_to_child_ip_address_list_id(child_ip_address_list)
+            )
 
         response = self.connection.request_with_orgId_api_2(
             "network/createIpAddressList",
@@ -3851,9 +3851,9 @@ class NttCisNodeDriver(NodeDriver):
                     ip_address.set("prefixSize", ip.prefix_size)
 
         if child_ip_address_lists is not None:
-            ET.SubElement(
-                edit_ip_address_list, "childIpAddressListId"
-            ).text = 
self._child_ip_address_list_to_child_ip_address_list_id(child_ip_address_lists)
+            ET.SubElement(edit_ip_address_list, "childIpAddressListId").text = 
(
+                
self._child_ip_address_list_to_child_ip_address_list_id(child_ip_address_lists)
+            )
         else:
             ET.SubElement(edit_ip_address_list, "childIpAddressListId", 
{"xsi:nil": "true"})
 
@@ -4051,9 +4051,9 @@ class NttCisNodeDriver(NodeDriver):
         """
 
         new_port_list = ET.Element("createPortList", {"xmlns": TYPES_URN})
-        ET.SubElement(
-            new_port_list, "networkDomainId"
-        ).text = self._network_domain_to_network_domain_id(ex_network_domain)
+        ET.SubElement(new_port_list, "networkDomainId").text = (
+            self._network_domain_to_network_domain_id(ex_network_domain)
+        )
 
         ET.SubElement(new_port_list, "name").text = name
 
@@ -4068,9 +4068,9 @@ class NttCisNodeDriver(NodeDriver):
 
         if child_portlist_list is not None:
             for child in child_portlist_list:
-                ET.SubElement(
-                    new_port_list, "childPortListId"
-                ).text = self._child_port_list_to_child_port_list_id(child)
+                ET.SubElement(new_port_list, "childPortListId").text = (
+                    self._child_port_list_to_child_port_list_id(child)
+                )
 
         response = self.connection.request_with_orgId_api_2(
             "network/createPortList", method="POST", 
data=ET.tostring(new_port_list)
@@ -4161,9 +4161,9 @@ class NttCisNodeDriver(NodeDriver):
 
         if child_portlist_list is not None:
             for child in child_portlist_list:
-                ET.SubElement(
-                    existing_port_address_list, "childPortListId"
-                ).text = self._child_port_list_to_child_port_list_id(child)
+                ET.SubElement(existing_port_address_list, 
"childPortListId").text = (
+                    self._child_port_list_to_child_port_list_id(child)
+                )
         else:
             ET.SubElement(existing_port_address_list, "childPortListId", 
{"xsi:nil": "true"})
 
@@ -5290,19 +5290,21 @@ class NttCisNodeDriver(NodeDriver):
             "description": findtext(element, "description", TYPES_URN),
             "sourceImageId": findtext(element, "sourceImageId", TYPES_URN),
             "networkId": findtext(element, "networkId", TYPES_URN),
-            "networkDomainId": element.find(fixxpath("networkInfo", 
TYPES_URN)).get(
-                "networkDomainId"
-            )
-            if has_network_info
-            else None,
+            "networkDomainId": (
+                element.find(fixxpath("networkInfo", 
TYPES_URN)).get("networkDomainId")
+                if has_network_info
+                else None
+            ),
             "datacenterId": element.get("datacenterId"),
             "deployedTime": findtext(element, "createTime", TYPES_URN),
             "window": (
-                element.find(fixxpath("snapshotService/window", 
TYPES_URN)).get("dayOfWeek"),
-                element.find(fixxpath("snapshotService/window", 
TYPES_URN)).get("startHour"),
-            )
-            if has_snapshot
-            else None,
+                (
+                    element.find(fixxpath("snapshotService/window", 
TYPES_URN)).get("dayOfWeek"),
+                    element.find(fixxpath("snapshotService/window", 
TYPES_URN)).get("startHour"),
+                )
+                if has_snapshot
+                else None
+            ),
             "cpu": cpu_spec,
             "memoryMb": int(findtext(element, "memoryGb", TYPES_URN)) * 1024,
             "OS_id": operation_system.get("id"),
diff --git a/libcloud/compute/drivers/vcloud.py 
b/libcloud/compute/drivers/vcloud.py
index b3d885dc1..ad455cbe6 100644
--- a/libcloud/compute/drivers/vcloud.py
+++ b/libcloud/compute/drivers/vcloud.py
@@ -450,7 +450,6 @@ class VCloudResponse(XmlResponse):
 
 
 class VCloudConnection(ConnectionUserAndKey):
-
     """
     Connection class for the vCloud driver
     """
@@ -500,7 +499,6 @@ class VCloudConnection(ConnectionUserAndKey):
 
 
 class VCloudNodeDriver(NodeDriver):
-
     """
     vCloud node driver
     """
@@ -910,7 +908,6 @@ class VCloudNodeDriver(NodeDriver):
 
 
 class HostingComConnection(VCloudConnection):
-
     """
     vCloud connection subclass for Hosting.com
     """
@@ -926,7 +923,6 @@ class HostingComConnection(VCloudConnection):
 
 
 class HostingComDriver(VCloudNodeDriver):
-
     """
     vCloud node driver for Hosting.com
     """
@@ -935,7 +931,6 @@ class HostingComDriver(VCloudNodeDriver):
 
 
 class TerremarkConnection(VCloudConnection):
-
     """
     vCloud connection subclass for Terremark
     """
@@ -944,7 +939,6 @@ class TerremarkConnection(VCloudConnection):
 
 
 class TerremarkDriver(VCloudNodeDriver):
-
     """
     vCloud node driver for Terremark
     """
@@ -1776,9 +1770,9 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
                     "xmlns:ovf": "http://schemas.dmtf.org/ovf/envelope/1";,
                 },
             )
-            ET.SubElement(
-                network_xml, "ovf:Info"
-            ).text = "Specifies the available VM network connections"
+            ET.SubElement(network_xml, "ovf:Info").text = (
+                "Specifies the available VM network connections"
+            )
 
             headers = {"Content-Type": 
"application/vnd.vmware.vcloud.networkConnectionSection+xml"}
             res = self.connection.request(
diff --git a/libcloud/loadbalancer/drivers/dimensiondata.py 
b/libcloud/loadbalancer/drivers/dimensiondata.py
index 5f250ae06..997ffb4b9 100644
--- a/libcloud/loadbalancer/drivers/dimensiondata.py
+++ b/libcloud/loadbalancer/drivers/dimensiondata.py
@@ -664,9 +664,9 @@ class DimensionDataLBDriver(Driver):
         if persistence_profile is not None:
             ET.SubElement(create_node_elm, "persistenceProfileId").text = 
persistence_profile.id
         if fallback_persistence_profile is not None:
-            ET.SubElement(
-                create_node_elm, "fallbackPersistenceProfileId"
-            ).text = fallback_persistence_profile.id
+            ET.SubElement(create_node_elm, 
"fallbackPersistenceProfileId").text = (
+                fallback_persistence_profile.id
+            )
         if irule is not None:
             ET.SubElement(create_node_elm, "iruleId").text = irule.id
 
diff --git a/libcloud/loadbalancer/drivers/nttcis.py 
b/libcloud/loadbalancer/drivers/nttcis.py
index 122726467..f55d5d200 100644
--- a/libcloud/loadbalancer/drivers/nttcis.py
+++ b/libcloud/loadbalancer/drivers/nttcis.py
@@ -736,9 +736,9 @@ class NttCisLBDriver(Driver):
         if optimization_profile is not None:
             ET.SubElement(create_node_elm, "optimizationProfile").text = 
optimization_profile
         if fallback_persistence_profile is not None:
-            ET.SubElement(
-                create_node_elm, "fallbackPersistenceProfileId"
-            ).text = fallback_persistence_profile.id
+            ET.SubElement(create_node_elm, 
"fallbackPersistenceProfileId").text = (
+                fallback_persistence_profile.id
+            )
         if irule is not None:
             ET.SubElement(create_node_elm, "iruleId").text = irule.id
 
diff --git a/libcloud/test/compute/test_abiquo.py 
b/libcloud/test/compute/test_abiquo.py
index 9e4a6ad0d..f3789ebd0 100644
--- a/libcloud/test/compute/test_abiquo.py
+++ b/libcloud/test/compute/test_abiquo.py
@@ -290,7 +290,6 @@ class AbiquoNodeDriverTest(TestCaseMixin, 
unittest.TestCase):
 
 
 class AbiquoMockHttp(MockHttp):
-
     """
     Mock the functionality of the remote Abiquo API.
     """
diff --git a/libcloud/test/compute/test_azure_arm.py 
b/libcloud/test/compute/test_azure_arm.py
index 90d532900..8efbc3c20 100644
--- a/libcloud/test/compute/test_azure_arm.py
+++ b/libcloud/test/compute/test_azure_arm.py
@@ -393,9 +393,11 @@ class AzureNodeDriverTests(LibcloudTestCase):
                 # 200 - NIC destroyed
                 lambda f: (httplib.OK, None, {}, "OK"),
                 # 200 - managed OS disk destroyed
-                lambda f: (httplib.OK, None, {}, "OK")
-                if response == 200
-                else error(BaseHTTPError, code=response, message="Deleted or 
deferred"),
+                lambda f: (
+                    (httplib.OK, None, {}, "OK")
+                    if response == 200
+                    else error(BaseHTTPError, code=response, message="Deleted 
or deferred")
+                ),
             ]
             ret = self.driver.destroy_node(node, ex_destroy_os_disk=True)
             self.assertTrue(ret)
diff --git a/libcloud/test/compute/test_gandi.py 
b/libcloud/test/compute/test_gandi.py
index 19b9832bb..349838cfe 100644
--- a/libcloud/test/compute/test_gandi.py
+++ b/libcloud/test/compute/test_gandi.py
@@ -171,7 +171,6 @@ class GandiTests(unittest.TestCase):
 
 
 class GandiRatingTests(unittest.TestCase):
-
     """Tests where rating model is involved"""
 
     node_name = "test2"
@@ -319,7 +318,6 @@ class GandiMockHttp(BaseGandiMockHttp):
 
 
 class GandiMockRatingHttp(BaseGandiMockHttp):
-
     """Fixtures needed for tests related to rating model"""
 
     fixtures = ComputeFileFixtures("gandi")
diff --git a/libcloud/test/compute/test_opennebula.py 
b/libcloud/test/compute/test_opennebula.py
index 47d9f999f..9f2391403 100644
--- a/libcloud/test/compute/test_opennebula.py
+++ b/libcloud/test/compute/test_opennebula.py
@@ -42,7 +42,6 @@ libcloud.compute.drivers.opennebula.API_HOST = "dummy"
 
 
 class OpenNebula_1_4_Tests(unittest.TestCase):
-
     """
     OpenNebula.org test suite for OpenNebula v1.4.
     """
@@ -252,7 +251,6 @@ class OpenNebula_1_4_Tests(unittest.TestCase):
 
 
 class OpenNebula_2_0_Tests(unittest.TestCase):
-
     """
     OpenNebula.org test suite for OpenNebula v2.0 through v2.2.
     """
@@ -537,7 +535,6 @@ class OpenNebula_2_0_Tests(unittest.TestCase):
 
 
 class OpenNebula_3_0_Tests(unittest.TestCase):
-
     """
     OpenNebula.org test suite for OpenNebula v3.0.
     """
@@ -580,7 +577,6 @@ class OpenNebula_3_0_Tests(unittest.TestCase):
 
 
 class OpenNebula_3_2_Tests(unittest.TestCase):
-
     """
     OpenNebula.org test suite for OpenNebula v3.2.
     """
@@ -644,7 +640,6 @@ class OpenNebula_3_2_Tests(unittest.TestCase):
 
 
 class OpenNebula_3_6_Tests(unittest.TestCase):
-
     """
     OpenNebula.org test suite for OpenNebula v3.6.
     """
@@ -713,7 +708,6 @@ class OpenNebula_3_6_Tests(unittest.TestCase):
 
 
 class OpenNebula_3_8_Tests(unittest.TestCase):
-
     """
     OpenNebula.org test suite for OpenNebula v3.8.
     """
@@ -764,7 +758,6 @@ class OpenNebula_3_8_Tests(unittest.TestCase):
 
 
 class OpenNebula_1_4_MockHttp(MockHttp):
-
     """
     Mock HTTP server for testing v1.4 of the OpenNebula.org compute driver.
     """
@@ -905,7 +898,6 @@ class OpenNebula_1_4_MockHttp(MockHttp):
 
 
 class OpenNebula_2_0_MockHttp(MockHttp):
-
     """
     Mock HTTP server for testing v2.0 through v3.2 of the OpenNebula.org
     compute driver.
@@ -1047,7 +1039,6 @@ class OpenNebula_2_0_MockHttp(MockHttp):
 
 
 class OpenNebula_3_0_MockHttp(OpenNebula_2_0_MockHttp):
-
     """
     Mock HTTP server for testing v3.0 of the OpenNebula.org compute driver.
     """
@@ -1092,7 +1083,6 @@ class OpenNebula_3_0_MockHttp(OpenNebula_2_0_MockHttp):
 
 
 class OpenNebula_3_2_MockHttp(OpenNebula_3_0_MockHttp):
-
     """
     Mock HTTP server for testing v3.2 of the OpenNebula.org compute driver.
     """
@@ -1125,7 +1115,6 @@ class OpenNebula_3_2_MockHttp(OpenNebula_3_0_MockHttp):
 
 
 class OpenNebula_3_6_MockHttp(OpenNebula_3_2_MockHttp):
-
     """
     Mock HTTP server for testing v3.6 of the OpenNebula.org compute driver.
     """
@@ -1193,7 +1182,6 @@ class OpenNebula_3_6_MockHttp(OpenNebula_3_2_MockHttp):
 
 
 class OpenNebula_3_8_MockHttp(OpenNebula_3_2_MockHttp):
-
     """
     Mock HTTP server for testing v3.8 of the OpenNebula.org compute driver.
     """
diff --git a/libcloud/test/compute/test_vcloud.py 
b/libcloud/test/compute/test_vcloud.py
index 981f788bf..9053074ca 100644
--- a/libcloud/test/compute/test_vcloud.py
+++ b/libcloud/test/compute/test_vcloud.py
@@ -1060,7 +1060,6 @@ class TerremarkMockHttp(MockHttp):
 
 
 class AnotherErrorMember(Exception):
-
     """
     helper class for the synthetic exception
     """
diff --git a/libcloud/test/container/test_lxd.py 
b/libcloud/test/container/test_lxd.py
index a9a437c5b..732bfd675 100644
--- a/libcloud/test/container/test_lxd.py
+++ b/libcloud/test/container/test_lxd.py
@@ -29,7 +29,6 @@ from libcloud.container.drivers.lxd import (
 
 
 class LXDContainerDriverTestCase(unittest.TestCase):
-
     """
     Unit tests for LXDContainerDriver
     """

Reply via email to