-
Notifications
You must be signed in to change notification settings - Fork 0
Remove rich library from fastmigrate #24
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ed21ff3
Remove rich library from fastmigrate
pydanny a42505d
Removes reporting of migration timing.
algal 5edea47
refactor stderr.write to print(...,file=stderr)
algal 70bc0d5
Streamline error message and link to instructions
algal 3822a48
Report migration failures only via stderr
algal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
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.
Just for my curiosity - why not use
printhere?Uh oh!
There was an error while loading. Please reload this page.
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.
My very brief thinking here was that since the string being printed was not UI copy defined in the code, but rather was a value being provided by other bits of API, then
sys.stderr.writecommunicated more clearly to the reader that this code is simply conveying the value directly without any modifications, such as the newline automatically added byprint.Of course I could suppress that and do
print(e.stderr.decode(),end='',file=stderr). This has the pro of being more consistent with the other uses of print, but the con of being a little more roundabout.So this seemed a little cleaner? But if I'd put more sugar in my coffee in the morning, I probably would have gone the other way. Borderline case!
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.
Well, you then immediately print a newline on the next line, so you end up with two lines instead of one IIUC…
FWIW, for this reader at least,
sys.stderr.writecommunicated to me that you're doing something special/different, and I should try to figure out why! :D