Skip to content

Commit 60470a6

Browse files
fix: ObjectRef.timestamp type should allow None
The from_json method can pass None for timestamp when it's missing from the data, so the type annotation should be datetime | None. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 96d3dae commit 60470a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/datajoint/objectref.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class ObjectRef:
4444
ext: File extension as tooling hint (e.g., ".dat", ".zarr") or None.
4545
This is a conventional suffix for tooling, not a content-type declaration.
4646
is_dir: True if stored content is a directory/key-prefix (e.g., Zarr store)
47-
timestamp: ISO 8601 upload timestamp
47+
timestamp: ISO 8601 upload timestamp, or None if not recorded
4848
mime_type: MIME type (files only, auto-detected from extension)
4949
item_count: Number of files (folders only), or None if not computed
5050
"""
@@ -54,7 +54,7 @@ class ObjectRef:
5454
hash: str | None
5555
ext: str | None
5656
is_dir: bool
57-
timestamp: datetime
57+
timestamp: datetime | None
5858
url: str | None = None
5959
store: str | None = None
6060
mime_type: str | None = None

0 commit comments

Comments
 (0)