class UnknownObject(Exception):
- '''
+ """
Raised when a component class handles a query for an object it doesn't
know about.
- '''
+ """
pass
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)
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
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
)
)
- 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:
)
)
- 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:
)
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')
class ComponentClassTestCase(unittest.TestCase):
def setUp(self):
class MySink(bt2._UserSinkComponent):
- '''
+ """
The description.
The help.
- '''
+ """
def _user_consume(self):
pass
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
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
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)
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)
# 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(
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',