Skip to content

Commit 91330a8

Browse files
committed
remove unnecessary method resulting from branch split
1 parent fe31808 commit 91330a8

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

linkml_runtime/utils/schemaview.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff 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
162140
class SchemaView(object):
163141
"""

tests/test_utils/test_schemaview.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
import unittest
32
import logging
43
from copy import copy
54
from pathlib import Path

0 commit comments

Comments
 (0)