Skip to content

Commit

Permalink
Merge pull request #328 from bluesky/made-precision-optional
Browse files Browse the repository at this point in the history
made precision optional
  • Loading branch information
evalott100 authored Oct 25, 2024
2 parents 830d59d + 038e935 commit 4715f9c
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 4715f9c

Please sign in to comment.