@@ -106,7 +106,8 @@ def validate_additional_properties(self) -> Self:
106
106
if len (self .properties ) == 0 and not self .additional_properties :
107
107
raise ValueError (
108
108
"Using `additional_properties=False` with no defined "
109
- "properties will cause the model to be pruned during graph cleaning." ,
109
+ "properties will cause the model to be pruned during graph cleaning. "
110
+ f"Define some properties or remove this NodeType: { self } "
110
111
)
111
112
return self
112
113
@@ -135,7 +136,8 @@ def validate_additional_properties(self) -> Self:
135
136
if len (self .properties ) == 0 and not self .additional_properties :
136
137
raise ValueError (
137
138
"Using `additional_properties=False` with no defined "
138
- "properties will cause the model to be pruned during graph cleaning." ,
139
+ "properties will cause the model to be pruned during graph cleaning. "
140
+ f"Define some properties or remove this RelationshipType: { self } "
139
141
)
140
142
return self
141
143
@@ -218,20 +220,6 @@ def validate_additional_parameters(self) -> Self:
218
220
)
219
221
return self
220
222
221
- @classmethod
222
- def default_additional_node_types (cls , validated_data : dict [str , Any ]) -> bool :
223
- return len (validated_data ["node_types" ]) == 0
224
-
225
- @classmethod
226
- def default_additional_relationship_types (
227
- cls , validated_data : dict [str , Any ]
228
- ) -> bool :
229
- return len (validated_data ["relationship_types" ]) == 0
230
-
231
- @classmethod
232
- def default_additional_patterns (cls , validated_data : dict [str , Any ]) -> bool :
233
- return len (validated_data ["patterns" ]) == 0
234
-
235
223
def node_type_from_label (self , label : str ) -> Optional [NodeType ]:
236
224
return self ._node_type_index .get (label )
237
225
0 commit comments