File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed
annotation_types/classification
serialization/labelbox_v1
tests/data/annotation_types/classification Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class Checklist(_TempName):
56
56
57
57
"""
58
58
name : Literal ["checklist" ] = "checklist"
59
- answer : ClassificationAnswer
59
+ answer : List [ ClassificationAnswer ]
60
60
61
61
62
62
class Text (BaseModel ):
Original file line number Diff line number Diff line change 9
9
10
10
11
11
class LBV1ClassificationAnswer (LBV1Feature ):
12
- def to_common (self , answer : "LBV1ClassificationAnswer" ) -> ClassificationAnswer :
13
- return ClassificationAnswer (feature_schema_id = answer .schema_id ,
14
- name = answer .title ,
15
- keyframe = answer .keyframe ,
12
+ def to_common (self ) -> ClassificationAnswer :
13
+ return ClassificationAnswer (feature_schema_id = self .schema_id ,
14
+ name = self .title ,
15
+ keyframe = self .keyframe ,
16
16
extra = {
17
- 'feature_id' : answer .feature_id ,
18
- 'value' : answer .value
17
+ 'feature_id' : self .feature_id ,
18
+ 'value' : self .value
19
19
})
20
20
21
21
@classmethod
Original file line number Diff line number Diff line change @@ -125,7 +125,6 @@ def test_checklist():
125
125
126
126
with pytest .raises (ValidationError ):
127
127
classification = Checklist (answer = answer )
128
- breakpoint ()
129
128
130
129
classification = Checklist (answer = [answer ])
131
130
assert classification .dict () == {
You can’t perform that action at this time.
0 commit comments