upgrade to support python3.7#51
Open
jiahut wants to merge 5 commits into
Open
Conversation
Author
|
refer to #50 |
Author
|
add the |
ErikBoesen
suggested changes
May 13, 2020
| # display line delims only if more than one file exists. facilitates piping file content | ||
| noDelim = len(gist['files']) == 1 or fileName != '' | ||
| for (file, data) in gist['files'].items(): | ||
| for (file, data) in list(gist['files'].items()): |
There was a problem hiding this comment.
Not so sure why the parentheses are necessary on this line. I think it could be
for file, data in gist['files'].items():| target = os.path.join(path,id) | ||
|
|
||
| print ('Gist \'{0}\' has {1} file(s)'.format(id, len(gist['files']))) | ||
| print(('Gist \'{0}\' has {1} file(s)'.format(id, len(gist['files'])))) |
| print(('Gist \'{0}\' has {1} file(s)'.format(id, len(gist['files'])))) | ||
| for file in gist['files']: | ||
| print (' ' + file) | ||
| print((' ' + file)) |
| print("Error message: " + str(e)) | ||
| else: | ||
| print 'Ok. I won\'t download the Gist.' | ||
| print('Ok. I won\'t download the Gist.') |
There was a problem hiding this comment.
Would be good to standardize on double or single quotes rather than both.
| oldgist['description'] = description | ||
| if content and content != '?': | ||
| for (file, data) in oldgist['files'].items(): | ||
| for (file, data) in list(oldgist['files'].items()): |
| gist = _get_gist(id) | ||
|
|
||
| print ('Gist \'{0}\' Description: {1}'.format(id, gist['description'])) | ||
| print(('Gist \'{0}\' Description: {1}'.format(id, gist['description']))) |
| print(('Gist \'{0}\' Description: {1}'.format(id, gist['description']))) | ||
| for file in gist['files']: | ||
| print (' ' + file) | ||
| print((' ' + file)) |
| print(textwrap.fill('An easy to use CLI to manage your GitHub Gists. Create, edit, append, view, search and backup your Gists.', defaults.max_width)) | ||
| print('') | ||
| print('Author: Nik Khilnani - https://github.com/khilnani/gists.cli') | ||
| print('') |
There was a problem hiding this comment.
Might be preferable to just add \n to the end of other print statements rather than printing out empty strings
| log.debug('OTP not required.') | ||
| else: | ||
| print 'Github rejected the username and password but didnt send an OTP header. Try again please' | ||
| print('Github rejected the username and password but didnt send an OTP header. Try again please') |
| sys.exit(0) | ||
| else: | ||
| print 'Uknown Error: ' + str(code) | ||
| print('Uknown Error: ' + str(code)) |
There was a problem hiding this comment.
Could take advantage of python3's format here
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.
fix the grammar error to support python3.7