Reformat Python files with Black v20.8b1
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 10 Sep 2020 15:35:58 +0000 (11:35 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 10 Sep 2020 22:07:55 +0000 (18:07 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I50a663f02800456ce2370383bbdaefa8e0ebabc1
Reviewed-on: https://review.lttng.org/c/babeltrace/+/4062
Tested-by: jenkins <jenkins@lttng.org>
src/bindings/python/bt2/bt2/__init__.py
src/bindings/python/bt2/bt2/error.py
src/bindings/python/bt2/bt2/message_iterator.py
src/bindings/python/bt2/bt2/trace_class.py
tests/bindings/python/bt2/test_component_class.py
tests/bindings/python/bt2/test_event.py
tests/bindings/python/bt2/test_message.py
tests/data/plugins/src.ctf.lttng-live/lttng_live_server.py

index b642e6a1218a306783062d5537385896e9af2656..9ed080e82c833c6f9690cccd25d80581e5da9f9c 100644 (file)
@@ -232,10 +232,10 @@ class _MemoryError(_Error):
 
 
 class UnknownObject(Exception):
-    '''
+    """
     Raised when a component class handles a query for an object it doesn't
     know about.
-    '''
+    """
 
     pass
 
index 9d06b88e80e9cee186d3fde72a620bdc859053fb..a067345187c3a646d35f1dc5eda93ebc66ce2b33 100644 (file)
@@ -58,11 +58,11 @@ class _ComponentErrorCause(_ErrorCause):
         self._component_name = native_bt.error_cause_component_actor_get_component_name(
             ptr
         )
-        self._component_class_type = native_bt.error_cause_component_actor_get_component_class_type(
-            ptr
+        self._component_class_type = (
+            native_bt.error_cause_component_actor_get_component_class_type(ptr)
         )
-        self._component_class_name = native_bt.error_cause_component_actor_get_component_class_name(
-            ptr
+        self._component_class_name = (
+            native_bt.error_cause_component_actor_get_component_class_name(ptr)
         )
         self._plugin_name = native_bt.error_cause_component_actor_get_plugin_name(ptr)
 
@@ -86,11 +86,11 @@ class _ComponentErrorCause(_ErrorCause):
 class _ComponentClassErrorCause(_ErrorCause):
     def __init__(self, ptr):
         super().__init__(ptr)
-        self._component_class_type = native_bt.error_cause_component_class_actor_get_component_class_type(
-            ptr
+        self._component_class_type = (
+            native_bt.error_cause_component_class_actor_get_component_class_type(ptr)
         )
-        self._component_class_name = native_bt.error_cause_component_class_actor_get_component_class_name(
-            ptr
+        self._component_class_name = (
+            native_bt.error_cause_component_class_actor_get_component_class_name(ptr)
         )
         self._plugin_name = native_bt.error_cause_component_class_actor_get_plugin_name(
             ptr
@@ -112,20 +112,22 @@ class _ComponentClassErrorCause(_ErrorCause):
 class _MessageIteratorErrorCause(_ErrorCause):
     def __init__(self, ptr):
         super().__init__(ptr)
-        self._component_name = native_bt.error_cause_message_iterator_actor_get_component_name(
-            ptr
+        self._component_name = (
+            native_bt.error_cause_message_iterator_actor_get_component_name(ptr)
         )
-        self._component_output_port_name = native_bt.error_cause_message_iterator_actor_get_component_output_port_name(
-            ptr
+        self._component_output_port_name = (
+            native_bt.error_cause_message_iterator_actor_get_component_output_port_name(
+                ptr
+            )
         )
-        self._component_class_type = native_bt.error_cause_message_iterator_actor_get_component_class_type(
-            ptr
+        self._component_class_type = (
+            native_bt.error_cause_message_iterator_actor_get_component_class_type(ptr)
         )
-        self._component_class_name = native_bt.error_cause_message_iterator_actor_get_component_class_name(
-            ptr
+        self._component_class_name = (
+            native_bt.error_cause_message_iterator_actor_get_component_class_name(ptr)
         )
-        self._plugin_name = native_bt.error_cause_message_iterator_actor_get_plugin_name(
-            ptr
+        self._plugin_name = (
+            native_bt.error_cause_message_iterator_actor_get_plugin_name(ptr)
         )
 
     @property
index ba9c316170ffbac1870012fad4774cf057b66ec7..62c5610c5f788673952f725af0fc84fe63767242 100644 (file)
@@ -390,8 +390,10 @@ class _UserMessageIterator(_MessageIterator):
                     )
                 )
 
-            ptr = native_bt.message_discarded_events_create_with_default_clock_snapshots(
-                self._bt_ptr, stream._ptr, beg_clock_snapshot, end_clock_snapshot
+            ptr = (
+                native_bt.message_discarded_events_create_with_default_clock_snapshots(
+                    self._bt_ptr, stream._ptr, beg_clock_snapshot, end_clock_snapshot
+                )
             )
         else:
             if beg_clock_snapshot is not None or end_clock_snapshot is not None:
@@ -435,8 +437,10 @@ class _UserMessageIterator(_MessageIterator):
                     )
                 )
 
-            ptr = native_bt.message_discarded_packets_create_with_default_clock_snapshots(
-                self._bt_ptr, stream._ptr, beg_clock_snapshot, end_clock_snapshot
+            ptr = (
+                native_bt.message_discarded_packets_create_with_default_clock_snapshots(
+                    self._bt_ptr, stream._ptr, beg_clock_snapshot, end_clock_snapshot
+                )
             )
         else:
             if beg_clock_snapshot is not None or end_clock_snapshot is not None:
index e99874499d6c9f1d3b1b93fa694aaa34011b8320..25a5cb6284f221a9cd0f8bf151e624096738ac22 100644 (file)
@@ -483,8 +483,10 @@ class _TraceClass(_TraceClassConst):
             )
         else:
             utils._check_type(ranges, bt2_integer_range_set.SignedIntegerRangeSet)
-            ptr = native_bt.field_class_option_with_selector_field_integer_signed_create(
-                self._ptr, content_fc._ptr, selector_fc._ptr, ranges._ptr
+            ptr = (
+                native_bt.field_class_option_with_selector_field_integer_signed_create(
+                    self._ptr, content_fc._ptr, selector_fc._ptr, ranges._ptr
+                )
             )
 
         self._check_field_class_create_status(ptr, 'option')
index bee368a13055f0553b0307358419f483ea65aa91..08b0c02be1177be878381f937b2396f309000de9 100644 (file)
@@ -300,11 +300,11 @@ class UserComponentClassTestCase(unittest.TestCase):
 class ComponentClassTestCase(unittest.TestCase):
     def setUp(self):
         class MySink(bt2._UserSinkComponent):
-            '''
+            """
             The description.
 
             The help.
-            '''
+            """
 
             def _user_consume(self):
                 pass
index 39486bc6b6bdc9daf7514df206c59dfd447b8552..979579b0e361339acdfb9b93bc932f6cc58a1f23 100644 (file)
@@ -330,7 +330,8 @@ class EventTestCase(unittest.TestCase):
 
     def test_const_getitem_no_packet(self):
         msg = self._create_test_const_event_message(
-            event_fields_config=self._event_payload_fields_config, with_ep=True,
+            event_fields_config=self._event_payload_fields_config,
+            with_ep=True,
         )
         ev = msg.event
 
@@ -377,7 +378,8 @@ class EventTestCase(unittest.TestCase):
 
     def test_iter_payload_only(self):
         msg = self._create_test_const_event_message(
-            event_fields_config=self._event_payload_fields_config, with_ep=True,
+            event_fields_config=self._event_payload_fields_config,
+            with_ep=True,
         )
         expected_field_names = [
             # payload
index d9e2fdbc186d5243edbfd7d6545efeae7ef8d962..fc75e1c596f02c9d82f235ad32a5af76c26d80b6 100644 (file)
@@ -425,7 +425,8 @@ class CreateDiscardedEventMessageTestCase(unittest.TestCase):
 
         def msg_iter_next(msg_iter, stream):
             with self.assertRaisesRegex(
-                ValueError, 'discarded event count is 0',
+                ValueError,
+                'discarded event count is 0',
             ):
                 msg_iter._create_discarded_events_message(stream, count=0)
 
@@ -572,7 +573,8 @@ class CreateDiscardedPacketMessageTestCase(unittest.TestCase):
 
         def msg_iter_next(msg_iter, stream):
             with self.assertRaisesRegex(
-                ValueError, 'discarded packet count is 0',
+                ValueError,
+                'discarded packet count is 0',
             ):
                 msg_iter._create_discarded_packets_message(stream, count=0)
 
@@ -604,7 +606,9 @@ class CreateDiscardedPacketMessageTestCase(unittest.TestCase):
     # Trying to create when the stream does not support discarded packets.
     def test_create_unsupported_raises(self):
         def create_stream_class(tc, cc):
-            return tc.create_stream_class(supports_packets=True,)
+            return tc.create_stream_class(
+                supports_packets=True,
+            )
 
         def msg_iter_next(msg_iter, stream):
             with self.assertRaisesRegex(
index 9bff60863a39bfbb8c0f9008be060b27b48da014..be42ac4f3c2fbc58b96cb736fde03d32af64d22a 100644 (file)
@@ -1533,7 +1533,9 @@ if __name__ == '__main__':
         help='Prefix to prepend to the trace paths of session configurations',
     )
     parser.add_argument(
-        '--sessions-filename', type=str, help='Path to a session configuration file',
+        '--sessions-filename',
+        type=str,
+        help='Path to a session configuration file',
     )
     parser.add_argument(
         '-h',
This page took 0.030425 seconds and 4 git commands to generate.