File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -216,8 +216,8 @@ class DiffKind(str, Enum):
216
216
217
217
class PolicyBreakSchema (BaseSchema ):
218
218
break_type = fields .String (data_key = "type" , required = True )
219
- detector_name = fields .String (required = True )
220
- detector_group_name = fields .String (required = True )
219
+ detector_name = fields .String (required = False )
220
+ detector_group_name = fields .String (required = False )
221
221
documentation_url = fields .String (
222
222
required = False , load_default = None , dump_default = None
223
223
)
@@ -251,11 +251,11 @@ class PolicyBreak(FromDictWithBase):
251
251
def __init__ (
252
252
self ,
253
253
break_type : str ,
254
- detector_name : str ,
255
- detector_group_name : str ,
256
254
policy : str ,
257
255
validity : str ,
258
256
matches : List [Match ],
257
+ detector_name : Optional [str ] = None ,
258
+ detector_group_name : Optional [str ] = None ,
259
259
documentation_url : Optional [str ] = None ,
260
260
known_secret : bool = False ,
261
261
incident_url : Optional [str ] = None ,
Original file line number Diff line number Diff line change @@ -117,9 +117,6 @@ def test_document_handle_surrogates(self):
117
117
PolicyBreak ,
118
118
{
119
119
"type" : "hello" ,
120
- "detector_name" : "hello" ,
121
- "detector_group_name" : "hello" ,
122
- "documentation_url" : None ,
123
120
"policy" : "hello" ,
124
121
"validity" : "hey" ,
125
122
"matches" : [{"match" : "hello" , "type" : "hello" }],
You can’t perform that action at this time.
0 commit comments