Skip to content

Commit 4af7d58

Browse files
committed
Comment tweaks
Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
1 parent 5675306 commit 4af7d58

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

.github/workflows/build_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: tests
1+
name: build_docs
22

33
on:
44
push:

monai/apps/detection/transforms/dictionary.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,10 @@ def __init__(self, box_keys: KeysCollection, box_ref_image_keys: str, allow_miss
125125
super().__init__(box_keys, allow_missing_keys)
126126
box_ref_image_keys_tuple = ensure_tuple(box_ref_image_keys)
127127
if len(box_ref_image_keys_tuple) > 1:
128-
raise ValueError("Please provide a single key for box_ref_image_keys.\
129-
All boxes of box_keys are attached to box_ref_image_keys.")
128+
raise ValueError(
129+
"Please provide a single key for box_ref_image_keys.\
130+
All boxes of box_keys are attached to box_ref_image_keys."
131+
)
130132
self.box_ref_image_keys = box_ref_image_keys
131133

132134
def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[Hashable, NdarrayOrTensor]:
@@ -809,15 +811,13 @@ def __init__(
809811
allow_missing_keys: bool = False,
810812
) -> None:
811813
box_keys_tuple = ensure_tuple(box_keys)
812-
if len(box_keys_tuple) < 1:
813-
raise ValueError(
814-
"Please provide at least one key for `box_keys`. All `label_keys` are attached to this `box_keys`."
815-
)
814+
if len(box_keys_tuple) != 1:
815+
raise ValueError("Provide a single key for `box_keys`. All `label_keys` are attached to this `box_keys`.")
816816
box_ref_image_keys_tuple = ensure_tuple(box_ref_image_keys)
817-
if len(box_ref_image_keys_tuple) < 1:
817+
if len(box_ref_image_keys_tuple) != 1:
818818
raise ValueError(
819-
"Please provide at least one key for `box_ref_image_keys`. "
820-
"All box_keys and label_keys are attached to this `box_ref_image_keys`."
819+
"Provide a single key for `box_ref_image_keys`. "
820+
"All `box_keys` and `label_keys` are attached to this `box_ref_image_keys`."
821821
)
822822

823823
self.label_keys = ensure_tuple(label_keys)
@@ -1086,8 +1086,10 @@ def __init__(
10861086

10871087
box_keys_tuple = ensure_tuple(box_keys)
10881088
if len(box_keys_tuple) != 1:
1089-
raise ValueError("Please provide a single key for box_keys.\
1090-
All label_keys are attached to this box_keys.")
1089+
raise ValueError(
1090+
"Please provide a single key for box_keys.\
1091+
All label_keys are attached to this box_keys."
1092+
)
10911093
self.box_keys = box_keys_tuple[0]
10921094
self.label_keys = ensure_tuple(label_keys)
10931095

0 commit comments

Comments
 (0)