Skip to content

Commit 8a9b4e4

Browse files
committed
read_only Relationship
1 parent 3daa25b commit 8a9b4e4

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

libs/labelbox/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "labelbox"
3-
version = "6.6.0"
3+
version = "6.6.1"
44
description = "Labelbox Python API"
55
authors = [{ name = "Labelbox", email = "engineering@labelbox.com" }]
66
dependencies = [

libs/labelbox/src/labelbox/data/annotation_types/relationship.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Union
1+
from typing import Union, Optional
22
from pydantic import BaseModel
33
from enum import Enum
44
from labelbox.data.annotation_types.annotation import (
@@ -16,6 +16,7 @@ class Type(Enum):
1616
source: Union[ObjectAnnotation, ClassificationAnnotation]
1717
target: ObjectAnnotation
1818
type: Type = Type.UNIDIRECTIONAL
19+
read_only: Optional[bool]
1920

2021

2122
class RelationshipAnnotation(BaseAnnotation):

libs/labelbox/src/labelbox/data/serialization/ndjson/relationship.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from typing import Optional
12
from pydantic import BaseModel
23
from .base import NDAnnotation, DataRow
34
from ...annotation_types.data import GenericDataRowData
@@ -13,7 +14,7 @@ class _Relationship(BaseModel):
1314
source: str
1415
target: str
1516
type: str
16-
17+
read_only: Optional[bool]
1718

1819
class NDRelationship(NDAnnotation):
1920
relationship: _Relationship
@@ -50,5 +51,6 @@ def from_common(
5051
source=str(relationship.source._uuid),
5152
target=str(relationship.target._uuid),
5253
type=relationship.type.value,
54+
read_only=relationship.read_only,
5355
),
5456
)

0 commit comments

Comments
 (0)