Skip to content

Commit

Permalink
made precision optional
Browse files Browse the repository at this point in the history
  • Loading branch information
evalott100 committed Oct 25, 2024
1 parent 830d59d commit 038e935
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/event_model/documents/event_descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class DataKey(TypedDict):
]
precision: NotRequired[
Annotated[
int,
Optional[int],
Field(
description="Number of digits after decimal place if "
"a floating point number"
Expand Down
9 changes: 8 additions & 1 deletion src/event_model/schemas/event_descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,14 @@
"precision": {
"title": "Precision",
"description": "Number of digits after decimal place if a floating point number",
"type": "integer"
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"shape": {
"title": "Shape",
Expand Down

0 comments on commit 038e935

Please sign in to comment.