Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Refactor
skeleton.to_json
to serialize skeleton object without jsonpickle #1934Refactor
skeleton.to_json
to serialize skeleton object without jsonpickle #1934Changes from 9 commits
cb62a2d
4c03ca2
f352d03
94dccb0
4febed0
c3448f4
3a7e65a
08b43ed
5decb55
622853c
884da47
06f18ab
6e37ca9
01d0255
71b0307
69db671
0e2f9b5
4ff6fdb
f0451c5
b4f10af
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Acknowledged the TODO for storing legacy metadata.
The TODO comment is a good reminder for a future enhancement to improve compatibility with legacy data.
Let me know if you need any help with implementing the storage of legacy metadata in labels to achieve byte-level compatibility. I can assist with the implementation or open a GitHub issue to track this task.
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.
Assuming jsonpickle is decoding by reading things in order, we expect that all
Node
s will only appear in the"nodes"
list once. Therefore, we can (hopefully) move the"nodes"
list before the"links"
dictionary. The"nodes"
list would need to define the nodes in the{py/object: ..., py/state: ...}
dictionary. Then, the"links"
dictionary should just reference nodes by"py/id"
(referencing theNode
's index in the"nodes"
list).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.
Assuming jsonpickle is decoding by reading things in order, we can assume that all
Node
s will only appear in the"nodes"
list once. Therefore, we can (hopefully) move the"nodes"
list before the"links"
dictionary. The"nodes"
list would need to define the nodes in the{py/object: ..., py/state: ...}
dictionary. Then, the"links"
dictionary should just reference nodes by"py/id"
(referencing theNode
's index in the"nodes"
list).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.
Address the unused variable
skeleton_dict
.The static analysis tool Ruff has correctly identified that the
skeleton_dict
variable is assigned but never used. This is a valid concern that should be addressed.Consider the following options to address the unused variable:
If the
skeleton_dict
is intended to be used later in the code, ensure that it is actually used. If not, remove the assignment.If the
skeleton_dict
is not needed, remove the entire code block that creates it.Please let me know if you need any assistance with addressing this issue.
Tools
Ruff