projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Apply black code formatter on all Python code
[babeltrace.git]
/
src
/
bindings
/
python
/
bt2
/
bt2
/
object.py
diff --git
a/src/bindings/python/bt2/bt2/object.py
b/src/bindings/python/bt2/bt2/object.py
index f73ec04bb67074573de5ee189e7a07f749c4e748..290f3febe5b3368da05f86501af635764e3d5ffa 100644
(file)
--- a/
src/bindings/python/bt2/bt2/object.py
+++ b/
src/bindings/python/bt2/bt2/object.py
@@
-38,9
+38,9
@@
class _BaseObject:
return int(self._ptr)
def __repr__(self):
return int(self._ptr)
def __repr__(self):
- return '<{}.{} object @ {}>'.format(
self.__class__.__module__,
- self.__class__.__name__,
-
hex(self.addr)
)
+ return '<{}.{} object @ {}>'.format(
+ self.__class__.__module__, self.__class__.__name__, hex(self.addr)
+ )
def __copy__(self):
raise NotImplementedError
def __copy__(self):
raise NotImplementedError
@@
-58,6
+58,7
@@
class _BaseObject:
# of unique objects, we make it so acquiring a reference on a unique object
# acquires a reference on its owner.
# of unique objects, we make it so acquiring a reference on a unique object
# acquires a reference on its owner.
+
class _UniqueObject(_BaseObject):
# Create a _UniqueObject.
class _UniqueObject(_BaseObject):
# Create a _UniqueObject.
@@
-69,8
+70,7
@@
class _UniqueObject(_BaseObject):
# - owner_put_ref: Callback to put a reference on the owner.
@classmethod
# - owner_put_ref: Callback to put a reference on the owner.
@classmethod
- def _create_from_ptr_and_get_ref(cls, ptr, owner_ptr,
- owner_get_ref, owner_put_ref):
+ def _create_from_ptr_and_get_ref(cls, ptr, owner_ptr, owner_get_ref, owner_put_ref):
obj = cls.__new__(cls)
obj._ptr = ptr
obj = cls.__new__(cls)
obj._ptr = ptr
This page took
0.02427 seconds
and
4
git commands to generate.