~lttng/babeltrace/trunk

« back to all changes in this revision

Viewing changes to src/bindings/python/bt2/bt2/component_descriptor.py

  • Committer: Philippe Proulx
  • Author(s): Simon Marchi
  • Date: 2023-09-21 17:29:44 UTC
  • Revision ID: git-v1:c345b07873b0cb0ed344bde32a322a1b1edf60ae
python: remove internal `import bt2` imports

Standardize the internal imports to import specific modules like this:

    from bt2 import foo as bt2_foo

... instead of importing the complete bt2 package.

Change-Id: I32eb223a8bcfe841020a2aafb976f121dadd8680
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10388
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
from bt2 import native_bt
6
6
from bt2 import component as bt2_component
7
 
import bt2
 
7
from bt2 import value as bt2_value
8
8
 
9
9
 
10
10
def _is_source_comp_cls(comp_cls):
56
56
            raise ValueError("cannot pass a Python object to a non-Python component")
57
57
 
58
58
        self._comp_cls = component_class
59
 
        self._params = bt2.create_value(params)
 
59
        self._params = bt2_value.create_value(params)
60
60
        self._obj = obj
61
61
 
62
62
    @property