black: run `black` version 19.10b0 on entire project
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 29 Oct 2019 13:00:25 +0000 (09:00 -0400)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 29 Oct 2019 14:35:47 +0000 (10:35 -0400)
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I2aee8b1fbd984af083fd3d0950ac6346852d2fe3
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2280
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
src/bindings/python/bt2/bt2/component.py
src/bindings/python/bt2/bt2/message_iterator.py
tests/bindings/python/bt2/test_message_iterator.py
tests/data/plugins/flt.utils.muxer/bt_plugin_muxer_test.py
tests/data/plugins/src.ctf.lttng-live/lttng_live_server.py

index 9d27e6e09093ca546edbbc523950b240d0e8f7ae..980a0d45f9f7dd42f9ca4100b38c124be978e161 100644 (file)
@@ -946,7 +946,10 @@ class _UserSinkComponent(_UserComponent, _SinkComponentConst):
     def _create_input_port_message_iterator(self, input_port):
         utils._check_type(input_port, bt2_port._UserComponentInputPort)
 
     def _create_input_port_message_iterator(self, input_port):
         utils._check_type(input_port, bt2_port._UserComponentInputPort)
 
-        status, msg_iter_ptr = native_bt.bt2_self_component_port_input_message_iterator_create_from_sink_component(
+        (
+            status,
+            msg_iter_ptr,
+        ) = native_bt.bt2_self_component_port_input_message_iterator_create_from_sink_component(
             self._bt_ptr, input_port._ptr
         )
         utils._handle_func_status(status, 'cannot create message iterator object')
             self._bt_ptr, input_port._ptr
         )
         utils._handle_func_status(status, 'cannot create message iterator object')
index 253fbcc73c4c9cdd63488fd381dc2fc671274e3f..8f3aac92ef6c8e045cefb62c13229706558d8825 100644 (file)
@@ -66,7 +66,10 @@ class _UserComponentInputPortMessageIterator(object._SharedObject, _MessageItera
         return bt2_message._create_from_ptr(msg_ptr)
 
     def can_seek_beginning(self):
         return bt2_message._create_from_ptr(msg_ptr)
 
     def can_seek_beginning(self):
-        status, res = native_bt.self_component_port_input_message_iterator_can_seek_beginning(
+        (
+            status,
+            res,
+        ) = native_bt.self_component_port_input_message_iterator_can_seek_beginning(
             self._ptr
         )
         utils._handle_func_status(
             self._ptr
         )
         utils._handle_func_status(
@@ -87,7 +90,10 @@ class _UserComponentInputPortMessageIterator(object._SharedObject, _MessageItera
 
     def can_seek_ns_from_origin(self, ns_from_origin):
         utils._check_int64(ns_from_origin)
 
     def can_seek_ns_from_origin(self, ns_from_origin):
         utils._check_int64(ns_from_origin)
-        status, res = native_bt.self_component_port_input_message_iterator_can_seek_ns_from_origin(
+        (
+            status,
+            res,
+        ) = native_bt.self_component_port_input_message_iterator_can_seek_ns_from_origin(
             self._ptr, ns_from_origin
         )
         utils._handle_func_status(
             self._ptr, ns_from_origin
         )
         utils._handle_func_status(
@@ -246,7 +252,10 @@ class _UserMessageIterator(_MessageIterator):
     def _create_input_port_message_iterator(self, input_port):
         utils._check_type(input_port, bt2_port._UserComponentInputPort)
 
     def _create_input_port_message_iterator(self, input_port):
         utils._check_type(input_port, bt2_port._UserComponentInputPort)
 
-        status, msg_iter_ptr = native_bt.bt2_self_component_port_input_message_iterator_create_from_message_iterator(
+        (
+            status,
+            msg_iter_ptr,
+        ) = native_bt.bt2_self_component_port_input_message_iterator_create_from_message_iterator(
             self._bt_ptr, input_port._ptr
         )
         utils._handle_func_status(status, 'cannot create message iterator object')
             self._bt_ptr, input_port._ptr
         )
         utils._handle_func_status(status, 'cannot create message iterator object')
index d03cdb302757b4b0b698bc94b5ce9755921b6daf..f2b9e2d3d51f08e9352260fe0fb38a1f1ca6ce07 100644 (file)
@@ -719,7 +719,7 @@ class UserMessageIteratorSeekNsFromOriginTestCase(unittest.TestCase):
                 )
 
     def test_can_seek_ns_from_origin_returns_false_can_seek_beginning_forward_seekable(
                 )
 
     def test_can_seek_ns_from_origin_returns_false_can_seek_beginning_forward_seekable(
-        self
+        self,
     ):
         # Test the case where:
         #
     ):
         # Test the case where:
         #
@@ -738,7 +738,7 @@ class UserMessageIteratorSeekNsFromOriginTestCase(unittest.TestCase):
         )
 
     def test_can_seek_ns_from_origin_returns_false_can_seek_beginning_not_forward_seekable(
         )
 
     def test_can_seek_ns_from_origin_returns_false_can_seek_beginning_not_forward_seekable(
-        self
+        self,
     ):
         # Test the case where:
         #
     ):
         # Test the case where:
         #
@@ -757,7 +757,7 @@ class UserMessageIteratorSeekNsFromOriginTestCase(unittest.TestCase):
         )
 
     def test_can_seek_ns_from_origin_returns_false_cant_seek_beginning_forward_seekable(
         )
 
     def test_can_seek_ns_from_origin_returns_false_cant_seek_beginning_forward_seekable(
-        self
+        self,
     ):
         # Test the case where:
         #
     ):
         # Test the case where:
         #
@@ -776,7 +776,7 @@ class UserMessageIteratorSeekNsFromOriginTestCase(unittest.TestCase):
         )
 
     def test_can_seek_ns_from_origin_returns_false_cant_seek_beginning_not_forward_seekable(
         )
 
     def test_can_seek_ns_from_origin_returns_false_cant_seek_beginning_not_forward_seekable(
-        self
+        self,
     ):
         # Test the case where:
         #
     ):
         # Test the case where:
         #
@@ -814,7 +814,7 @@ class UserMessageIteratorSeekNsFromOriginTestCase(unittest.TestCase):
                 )
 
     def test_no_can_seek_ns_from_origin_no_seek_ns_from_origin_can_seek_beginning_forward_seekable(
                 )
 
     def test_no_can_seek_ns_from_origin_no_seek_ns_from_origin_can_seek_beginning_forward_seekable(
-        self
+        self,
     ):
         # Test the case where:
         #
     ):
         # Test the case where:
         #
@@ -833,7 +833,7 @@ class UserMessageIteratorSeekNsFromOriginTestCase(unittest.TestCase):
         )
 
     def test_no_can_seek_ns_from_origin_no_seek_ns_from_origin_can_seek_beginning_not_forward_seekable(
         )
 
     def test_no_can_seek_ns_from_origin_no_seek_ns_from_origin_can_seek_beginning_not_forward_seekable(
-        self
+        self,
     ):
         # Test the case where:
         #
     ):
         # Test the case where:
         #
@@ -852,7 +852,7 @@ class UserMessageIteratorSeekNsFromOriginTestCase(unittest.TestCase):
         )
 
     def test_no_can_seek_ns_from_origin_no_seek_ns_from_origin_cant_seek_beginning_forward_seekable(
         )
 
     def test_no_can_seek_ns_from_origin_no_seek_ns_from_origin_cant_seek_beginning_forward_seekable(
-        self
+        self,
     ):
         # Test the case where:
         #
     ):
         # Test the case where:
         #
@@ -871,7 +871,7 @@ class UserMessageIteratorSeekNsFromOriginTestCase(unittest.TestCase):
         )
 
     def test_no_can_seek_ns_from_origin_no_seek_ns_from_origin_cant_seek_beginning_not_forward_seekable(
         )
 
     def test_no_can_seek_ns_from_origin_no_seek_ns_from_origin_cant_seek_beginning_not_forward_seekable(
-        self
+        self,
     ):
         # Test the case where:
         #
     ):
         # Test the case where:
         #
index c263d20396060017deb108d68e85d0bbee8bb406..8c2c4560cf31cf98121218cc3503ab5fe4915a1f 100644 (file)
@@ -421,7 +421,7 @@ class DiffInactivityMsgCs:
         src._add_output_port('out2', (test_name, cc2))
 
     def create_msgs(msg_iter, params):
         src._add_output_port('out2', (test_name, cc2))
 
     def create_msgs(msg_iter, params):
-        cc, = params
+        (cc,) = params
         sb_msg = msg_iter._create_message_iterator_inactivity_message(cc, 0)
         msg_iter._msgs = [sb_msg]
 
         sb_msg = msg_iter._create_message_iterator_inactivity_message(cc, 0)
         msg_iter._msgs = [sb_msg]
 
index a30dbc4657c79d65bead37cc264b49da8f9cf370..91e1cc8a6f446b4df30e78520a7cfebffb26c45c 100644 (file)
@@ -457,7 +457,7 @@ class _LttngLiveViewerProtocolCodec:
                 version, tracing_session_id, offset, seek_type
             )
         elif cmd_type == 4:
                 version, tracing_session_id, offset, seek_type
             )
         elif cmd_type == 4:
-            stream_id, = self._unpack_payload('Q', data)
+            (stream_id,) = self._unpack_payload('Q', data)
             return _LttngLiveViewerGetNextDataStreamIndexEntryCommand(
                 version, stream_id
             )
             return _LttngLiveViewerGetNextDataStreamIndexEntryCommand(
                 version, stream_id
             )
@@ -467,15 +467,15 @@ class _LttngLiveViewerProtocolCodec:
                 version, stream_id, offset, req_length
             )
         elif cmd_type == 6:
                 version, stream_id, offset, req_length
             )
         elif cmd_type == 6:
-            stream_id, = self._unpack_payload('Q', data)
+            (stream_id,) = self._unpack_payload('Q', data)
             return _LttngLiveViewerGetMetadataStreamDataCommand(version, stream_id)
         elif cmd_type == 7:
             return _LttngLiveViewerGetMetadataStreamDataCommand(version, stream_id)
         elif cmd_type == 7:
-            tracing_session_id, = self._unpack_payload('Q', data)
+            (tracing_session_id,) = self._unpack_payload('Q', data)
             return _LttngLiveViewerGetNewStreamInfosCommand(version, tracing_session_id)
         elif cmd_type == 8:
             return _LttngLiveViewerCreateViewerSessionCommand(version)
         elif cmd_type == 9:
             return _LttngLiveViewerGetNewStreamInfosCommand(version, tracing_session_id)
         elif cmd_type == 8:
             return _LttngLiveViewerCreateViewerSessionCommand(version)
         elif cmd_type == 9:
-            tracing_session_id, = self._unpack_payload('Q', data)
+            (tracing_session_id,) = self._unpack_payload('Q', data)
             return _LttngLiveViewerDetachFromTracingSessionCommand(
                 version, tracing_session_id
             )
             return _LttngLiveViewerDetachFromTracingSessionCommand(
                 version, tracing_session_id
             )
@@ -674,9 +674,15 @@ class _LttngDataStreamIndex(collections.abc.Sequence):
                     break
 
                 assert len(data) == size
                     break
 
                 assert len(data) == size
-                offset_bytes, total_size_bits, content_size_bits, timestamp_begin, timestamp_end, events_discarded, stream_class_id = struct.unpack(
-                    fmt, data
-                )
+                (
+                    offset_bytes,
+                    total_size_bits,
+                    content_size_bits,
+                    timestamp_begin,
+                    timestamp_end,
+                    events_discarded,
+                    stream_class_id,
+                ) = struct.unpack(fmt, data)
 
                 self._entries.append(
                     _LttngDataStreamIndexEntry(
 
                 self._entries.append(
                     _LttngDataStreamIndexEntry(
This page took 0.029206 seconds and 4 git commands to generate.