~lttng/babeltrace/trunk

« back to all changes in this revision

Viewing changes to src/bindings/python/bt2/bt2/value.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:
5
5
from bt2 import native_bt
6
6
from bt2 import object as bt2_object
7
7
from bt2 import utils as bt2_utils
 
8
from bt2 import error as bt2_error
8
9
import collections.abc
9
10
import functools
10
11
import numbers
11
12
import math
12
13
import abc
13
 
import bt2
14
14
 
15
15
 
16
16
def _create_from_ptr_template(ptr, object_map):
102
102
 
103
103
    def _check_create_status(self, ptr):
104
104
        if ptr is None:
105
 
            raise bt2._MemoryError(
 
105
            raise bt2_error._MemoryError(
106
106
                "cannot create {} value object".format(self._NAME.lower())
107
107
            )
108
108