Skip to content

Commit

Permalink
remove unnecessary method resulting from branch split
Browse files Browse the repository at this point in the history
  • Loading branch information
sierra-moxon committed Oct 2, 2024
1 parent fe31808 commit 91330a8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
22 changes: 0 additions & 22 deletions linkml_runtime/utils/schemaview.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,28 +136,6 @@ def to_dict(obj):
else:
return obj


def get_anonymous_class_definition(class_as_dict: ClassDefinition) -> AnonymousClassExpression:
"""
Convert a ClassDefinition to an AnonymousClassExpression, typically for use in defining an Expression object
(e.g. SlotDefinition.range_expression). This method only fills out the fields that are present in the
AnonymousClassExpression class. #TODO: We should consider whether an Expression should share a common ancestor with
the Definition classes.
:param class_as_dict: The ClassDefinition to convert.
:return: An AnonymousClassExpression.
"""
an_expr = AnonymousClassExpression()
print(class_as_dict)
valid_fields = {field.name for field in fields(an_expr)}
for k, v in class_as_dict.items():
if k in valid_fields:
setattr(an_expr, k, v)
for k, v in class_as_dict.items():
setattr(an_expr, k, v)
return an_expr


@dataclass
class SchemaView(object):
"""
Expand Down
1 change: 0 additions & 1 deletion tests/test_utils/test_schemaview.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import unittest
import logging
from copy import copy
from pathlib import Path
Expand Down

0 comments on commit 91330a8

Please sign in to comment.