minor modifications to Spec.__repr__#21723
Closed
cosmicexplorer wants to merge 1 commit intospack:developfrom
Closed
minor modifications to Spec.__repr__#21723cosmicexplorer wants to merge 1 commit intospack:developfrom
cosmicexplorer wants to merge 1 commit intospack:developfrom
Conversation
tgamblin
reviewed
Mar 10, 2021
Member
tgamblin
left a comment
There was a problem hiding this comment.
Let's get rid of the type stuff if it's not the minimally necessary set of type annotations for mypy to pass. As we discussed, we're not going all-in on typing until we can at least ditch Python 2 (which will be a while).
RE:
Is this repr() impl more correct? Is there a specific reason we were breaking the repr() contract by calling str() before?
I would need to look at this in more detail, but one thing to consider is that we don't always have a way to create a reproducible repr() for a concrete spec. That may take some more work to fix.
8d63434 to
cb73762
Compare
cb73762 to
86ee8fb
Compare
86ee8fb to
1eac9f3
Compare
1eac9f3 to
a4f79dd
Compare
Contributor
Author
|
There's no need for this PR any further. |
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.
This PR is composed of two minor changes to the
Specclass, along with two further distinct changes which I would like some review on:Spec.__init__().Spec.__repr__()to return a string which can beeval()ed to produce the same object.Desired Feedback
repr()impl more correct? Is there a specific reason we were breaking therepr()contract by callingstr()before?