File tree Expand file tree Collapse file tree 2 files changed +0
-23
lines changed Expand file tree Collapse file tree 2 files changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -136,28 +136,6 @@ def to_dict(obj):
136136 else :
137137 return obj
138138
139-
140- def get_anonymous_class_definition (class_as_dict : ClassDefinition ) -> AnonymousClassExpression :
141- """
142- Convert a ClassDefinition to an AnonymousClassExpression, typically for use in defining an Expression object
143- (e.g. SlotDefinition.range_expression). This method only fills out the fields that are present in the
144- AnonymousClassExpression class. #TODO: We should consider whether an Expression should share a common ancestor with
145- the Definition classes.
146-
147- :param class_as_dict: The ClassDefinition to convert.
148- :return: An AnonymousClassExpression.
149- """
150- an_expr = AnonymousClassExpression ()
151- print (class_as_dict )
152- valid_fields = {field .name for field in fields (an_expr )}
153- for k , v in class_as_dict .items ():
154- if k in valid_fields :
155- setattr (an_expr , k , v )
156- for k , v in class_as_dict .items ():
157- setattr (an_expr , k , v )
158- return an_expr
159-
160-
161139@dataclass
162140class SchemaView (object ):
163141 """
Original file line number Diff line number Diff line change 11import os
2- import unittest
32import logging
43from copy import copy
54from pathlib import Path
You can’t perform that action at this time.
0 commit comments