Skip to content

Commit

Permalink
turned identifiable to dataclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabefire committed Nov 17, 2024
1 parent 49b418a commit 6a1429d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/labelbox/src/labelbox/schema/identifiable.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import Union

from labelbox.schema.id_type import IdType
from pydantic.dataclasses import dataclass


class Identifiable(ABC):
Expand Down Expand Up @@ -31,6 +32,7 @@ def __str__(self):
return f"{self.id_type}:{self.key}"


@dataclass
class UniqueId(Identifiable):
"""
Represents a unique, internally generated id.
Expand All @@ -40,6 +42,7 @@ def __init__(self, key: str):
super().__init__(key, IdType.DataRowId)


@dataclass
class GlobalKey(Identifiable):
"""
Represents a user generated id.
Expand Down

0 comments on commit 6a1429d

Please sign in to comment.