-
Notifications
You must be signed in to change notification settings - Fork 89
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
rmv unnecessary default_factories #1905
Conversation
tests/test_biolink_model/output/biolink-model.model.context.jsonld
Outdated
Show resolved
Hide resolved
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1905 +/- ##
=======================================
Coverage 80.05% 80.05%
=======================================
Files 100 100
Lines 11500 11500
Branches 2968 2902 -66
=======================================
Hits 9206 9206
Misses 1738 1738
Partials 556 556 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much cleaner, thanks.
Btw, looks like you accidentally committed 2 /output/
files. These are annoying vestige we need to get rid of. Mostly it's harmless to commit these changes but it could lead to spurious conflicts. See https://linkml.io/linkml/contributing/contributing.html#general-tips
As far as I can tell, the pattern
field(default_factory=lambda: X)
makes sense if you have a mutable field, a field that requires substantial computation, or a field where the assignment needs to be delayed until after the definition of the class. In the case where X is simply a bool, an int, or a string, I don't think this does anything for you and can safely be removed. Is there a reason to have this that I am missing?