@@ -101,11 +101,15 @@ def test_unknown_field_returns_string_schema(self) -> None:
101101 assert result ["type" ] == "string"
102102
103103 def test_optional_scalar_field_allows_empty_string (self ) -> None :
104- result = get_field_pattern_schema ("mitigation_issue" , "^https://github.com/.*$" , is_optional = True )
104+ result = get_field_pattern_schema (
105+ "mitigation_issue" , "^https://github.com/.*$" , is_optional = True
106+ )
105107 assert result == {"type" : "string" , "pattern" : "^$|^https://github.com/.*$" }
106108
107109 def test_mandatory_scalar_field_does_not_allow_empty_string (self ) -> None :
108- result = get_field_pattern_schema ("status" , "^(valid|invalid)$" , is_optional = False )
110+ result = get_field_pattern_schema (
111+ "status" , "^(valid|invalid)$" , is_optional = False
112+ )
109113 assert result == {"type" : "string" , "pattern" : "^(valid|invalid)$" }
110114 # Should not have alternation with empty string
111115 assert "^$|" not in result .get ("pattern" , "" )
@@ -183,7 +187,10 @@ def test_optional_fields_not_required(self) -> None:
183187 assert "comment" not in result ["required" ]
184188 assert "comment" in result ["properties" ]
185189 # Optional fields should allow empty strings via pattern alternation
186- assert result ["properties" ]["comment" ] == {"type" : "string" , "pattern" : "^$|^.*$" }
190+ assert result ["properties" ]["comment" ] == {
191+ "type" : "string" ,
192+ "pattern" : "^$|^.*$" ,
193+ }
187194
188195 def test_ignored_fields_excluded (self ) -> None :
189196 mandatory = {field : "^.*$" for field in IGNORE_FIELDS }
0 commit comments