Skip to content

Commit e4209db

Browse files
Update src/dataverse_sdk/client.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 15f50d1 commit e4209db

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

src/dataverse_sdk/client.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -386,12 +386,15 @@ def create_table(self, tablename: str, schema: Dict[str, Any]) -> Dict[str, Any]
386386
387387
- Primitive types: ``"string"``, ``"int"``, ``"decimal"``, ``"float"``, ``"datetime"``, ``"bool"``
388388
- Enum subclass (IntEnum preferred): Creates a local option set. Optional multilingual
389-
labels can be provided via ``__labels__`` class attribute::
390-
391-
__labels__ = {
392-
1033: {"Active": "Active", "Inactive": "Inactive"},
393-
1036: {"Active": "Actif", "Inactive": "Inactif"}
394-
}
389+
labels can be provided via ``__labels__`` class attribute, defined inside the Enum subclass::
390+
391+
class ItemStatus(IntEnum):
392+
ACTIVE = 1
393+
INACTIVE = 2
394+
__labels__ = {
395+
1033: {"Active": "Active", "Inactive": "Inactive"},
396+
1036: {"Active": "Actif", "Inactive": "Inactif"}
397+
}
395398
396399
:type schema: dict[str, Any]
397400

0 commit comments

Comments
 (0)