diff --git a/ironic_tempest_plugin/common/waiters.py b/ironic_tempest_plugin/common/waiters.py
index 554e5f8..c5b9bd0 100644
--- a/ironic_tempest_plugin/common/waiters.py
+++ b/ironic_tempest_plugin/common/waiters.py
@@ -28,9 +28,9 @@
         timeout = default_timeout
     if interval is None:
         interval = default_interval
-    if (not isinstance(timeout, six.integer_types) or
-            not isinstance(interval, six.integer_types) or
-            timeout < 0 or interval < 0):
+    if (not isinstance(timeout, six.integer_types)
+            or not isinstance(interval, six.integer_types)
+            or timeout < 0 or interval < 0):
         raise AssertionError(
             'timeout and interval should be >= 0 or None, current values are: '
             '%(timeout)s, %(interval)s respectively. If timeout and/or '
diff --git a/ironic_tempest_plugin/services/baremetal/base.py b/ironic_tempest_plugin/services/baremetal/base.py
index 46c0a2f..3c52fcd 100644
--- a/ironic_tempest_plugin/services/baremetal/base.py
+++ b/ironic_tempest_plugin/services/baremetal/base.py
@@ -67,8 +67,9 @@
 
     def request(self, *args, **kwargs):
         resp, resp_body = super(BaremetalClient, self).request(*args, **kwargs)
-        if (BAREMETAL_MICROVERSION and
-            BAREMETAL_MICROVERSION != api_version_utils.LATEST_MICROVERSION):
+        latest_microversion = api_version_utils.LATEST_MICROVERSION
+        if (BAREMETAL_MICROVERSION
+                and BAREMETAL_MICROVERSION != latest_microversion):
             api_version_utils.assert_version_header_matches_request(
                 self.api_microversion_header_name,
                 BAREMETAL_MICROVERSION,
diff --git a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
index 4f8bfe8..5be84cc 100644
--- a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
+++ b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
@@ -459,8 +459,8 @@
     @classmethod
     def skip_checks(cls):
         super(BaremetalStandaloneScenarioTest, cls).skip_checks()
-        if (cls.driver not in CONF.baremetal.enabled_drivers +
-                CONF.baremetal.enabled_hardware_types):
+        if (cls.driver not in CONF.baremetal.enabled_drivers
+                + CONF.baremetal.enabled_hardware_types):
             raise cls.skipException(
                 'The driver: %(driver)s used in test is not in the list of '
                 'enabled_drivers %(enabled_drivers)s or '
diff --git a/ironic_tempest_plugin/tests/scenario/introspection_manager.py b/ironic_tempest_plugin/tests/scenario/introspection_manager.py
index 0131089..3eb3f43 100644
--- a/ironic_tempest_plugin/tests/scenario/introspection_manager.py
+++ b/ironic_tempest_plugin/tests/scenario/introspection_manager.py
@@ -64,10 +64,10 @@
         # microversion
         self.useFixture(IronicMicroversionFixture(self.ironic_api_version))
         self.flavor = self.baremetal_flavor()
-        self.node_ids = {node['uuid'] for node in
-                         self.node_filter(filter=lambda node:
-                                          node['provision_state'] ==
-                                          BaremetalProvisionStates.AVAILABLE)}
+        self.node_ids = {
+            node['uuid'] for node in self.node_filter(
+                filter=lambda node:
+                node['provision_state'] == BaremetalProvisionStates.AVAILABLE)}
         self.rule_purge()
 
     def item_filter(self, list_method, show_method,
@@ -204,8 +204,8 @@
                         raise exceptions.IntrospectionFailed(message)
                     not_introspected = not_introspected - {node_id}
 
-            if (int(time.time()) - start >=
-                    CONF.baremetal_introspection.introspection_timeout):
+            if (int(time.time()) - start
+                    >= CONF.baremetal_introspection.introspection_timeout):
                 message = ('Introspection timed out for nodes: %s' %
                            not_introspected)
                 raise exceptions.IntrospectionTimeout(message)
@@ -228,8 +228,8 @@
                 raise exceptions.HypervisorUpdateTimeout(message)
 
     def node_cleanup(self, node_id):
-        if (self.node_show(node_id)['provision_state'] ==
-           BaremetalProvisionStates.AVAILABLE):
+        if (self.node_show(node_id)['provision_state']
+                == BaremetalProvisionStates.AVAILABLE):
             return
         # in case when introspection failed we need set provision state
         # to 'manage' to make it possible transit into 'provide' state
diff --git a/ironic_tempest_plugin/tests/scenario/test_baremetal_multitenancy.py b/ironic_tempest_plugin/tests/scenario/test_baremetal_multitenancy.py
index 92f41fd..33d8724 100644
--- a/ironic_tempest_plugin/tests/scenario/test_baremetal_multitenancy.py
+++ b/ironic_tempest_plugin/tests/scenario/test_baremetal_multitenancy.py
@@ -44,8 +44,8 @@
         if not CONF.baremetal.use_provision_network:
             msg = 'Ironic/Neutron tenant isolation is not configured.'
             raise cls.skipException(msg)
-        if (CONF.baremetal.available_nodes is not None and
-                CONF.baremetal.available_nodes < 2):
+        if (CONF.baremetal.available_nodes is not None
+                and CONF.baremetal.available_nodes < 2):
             msg = ('Not enough baremetal nodes, %d configured, test requires '
                    'a minimum of 2') % CONF.baremetal.available_nodes
             raise cls.skipException(msg)
diff --git a/ironic_tempest_plugin/tests/scenario/test_baremetal_single_tenant.py b/ironic_tempest_plugin/tests/scenario/test_baremetal_single_tenant.py
index 3715608..d935874 100644
--- a/ironic_tempest_plugin/tests/scenario/test_baremetal_single_tenant.py
+++ b/ironic_tempest_plugin/tests/scenario/test_baremetal_single_tenant.py
@@ -44,8 +44,8 @@
         if not CONF.baremetal.use_provision_network:
             msg = 'Ironic/Neutron tenant isolation is not configured.'
             raise cls.skipException(msg)
-        if (CONF.baremetal.available_nodes is not None and
-                CONF.baremetal.available_nodes < 2):
+        if (CONF.baremetal.available_nodes is not None
+                and CONF.baremetal.available_nodes < 2):
             msg = ('Not enough baremetal nodes, %d configured, test requires '
                    'a minimum of 2') % CONF.baremetal.available_nodes
             raise cls.skipException(msg)
diff --git a/ironic_tempest_plugin/tests/scenario/test_introspection_discovery.py b/ironic_tempest_plugin/tests/scenario/test_introspection_discovery.py
index 6f92d43..6ebfcc6 100644
--- a/ironic_tempest_plugin/tests/scenario/test_introspection_discovery.py
+++ b/ironic_tempest_plugin/tests/scenario/test_introspection_discovery.py
@@ -92,9 +92,9 @@
 
         discovered_node = None
         for node in nodes:
-            if (node['provision_state'] == ProvisionStates.AVAILABLE or
-                    node['provision_state'] == ProvisionStates.ENROLL or
-                    node['provision_state'] is ProvisionStates.NOSTATE):
+            if (node['provision_state'] == ProvisionStates.AVAILABLE
+                    or node['provision_state'] == ProvisionStates.ENROLL
+                    or node['provision_state'] is ProvisionStates.NOSTATE):
                 discovered_node = node['uuid']
                 break
 
