Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roll down parent inheritance recursively #14

Merged
merged 18 commits into from
Oct 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
model checkpoint before fixing group generation
sneakers-the-rat committed Sep 26, 2024
commit 886d3db8604427d67bd0bfcc8fc4802c80fb2dbf
14 changes: 2 additions & 12 deletions nwb_linkml/src/nwb_linkml/includes/base.py
Original file line number Diff line number Diff line change
@@ -27,12 +27,7 @@ def coerce_value(cls, v: Any, handler, info) -> Any:
try:
return handler(v["value"])
except (IndexError, KeyError, TypeError):
raise ValueError(
f"coerce_value: Could not use the value field of {type(v)} "
f"to construct {cls.__name__}.{info.field_name}, "
f"expected type: {cls.model_fields[info.field_name].annotation}\\n"
f"inner error: {str(e1)}"
) from e1
raise e1
"""

BASEMODEL_CAST_WITH_VALUE = """
@@ -46,12 +41,7 @@ def cast_with_value(cls, v: Any, handler, info) -> Any:
try:
return handler({"value": v})
except Exception:
raise ValueError(
f"cast_with_value: Could not cast {type(v)} as value field for "
f"{cls.__name__}.{info.field_name},"
f" expected_type: {cls.model_fields[info.field_name].annotation}\\n"
f"inner error: {str(e1)}"
) from e1
raise e1
"""

BASEMODEL_COERCE_CHILD = """

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading