Extended the snapshot function to handle type instances#1301
Open
shirleyyzhang wants to merge 4 commits intopyta-uoft:masterfrom
Open
Extended the snapshot function to handle type instances#1301shirleyyzhang wants to merge 4 commits intopyta-uoft:masterfrom
shirleyyzhang wants to merge 4 commits intopyta-uoft:masterfrom
Conversation
Collaborator
Pull Request Test Coverage Report for Build 22084725112Details
💛 - Coveralls |
packages/python-ta/CHANGELOG.md
Outdated
| - Added tests for `infinite_loop_checker.py` to improve coverage for the `_name_holds_generator` function and the generator portion of the `_check_constant_loop_cond` function. | ||
| - Refactored `test_main.py` calls to use click's testing helpers. | ||
| - The `Z3Visitor`, `Z3Parser`, and `Z3ParseException` classes have been extracted into a _new Python package_, `python-ta-z3`. | ||
| - Extended `snapshot_to_json` behaviour to handle `type` instances and display the `repr` of the type. |
Contributor
There was a problem hiding this comment.
This is an enhancement, not an internal change
| elif isinstance(val, type): | ||
| value_entry = { | ||
| "type": ".class", | ||
| "name": type(val).__name__, |
Contributor
There was a problem hiding this comment.
use the hard-coded name "class" here instead, which is a bit more consistent with Python terminology
| - Extended `AccumulationTable` class to support multiple loops in sequence within the same context manager | ||
| - Added a solution to prevent possible large snippets created by the `render_generic` function | ||
| - Support Python 3.14 | ||
| - Extended `snapshot_to_json` behaviour to handle `type` instances and display the `repr` of the type. |
Contributor
There was a problem hiding this comment.
This needs to be added to the "unreleased" section
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed Changes
snapshot_to_jsonfunction such that when recursing on type instances, the snapshot function shows thereprof the type, e.g. (<class 'int'>), rather than expanding the__dict__of the class.Screenshots of your changes (if applicable)
Type of Change
(Write an
Xor a brief description next to the type or types that best describe your changes.)Checklist
(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the
[ ]into a[x]in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)Before opening your pull request:
After opening your pull request:
Questions and Comments
(Include any questions or comments you have regarding your changes.)