diff options
author | borenet <borenet@google.com> | 2014-06-25 08:40:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-06-25 08:40:58 -0700 |
commit | 3da21d2b62270c993167e98b28a3b6a0967f847f (patch) | |
tree | 8c28c324a9a2e09fe5d4a9f272a6ce4c82772114 /tools/add_codereview_message.py | |
parent | ec368cf4d6efec8354c2c316cabfb3f5d59643f8 (diff) |
Whitespace fixes for Python tools
BUG=skia:
R=rmistry@google.com
Author: borenet@google.com
Review URL: https://codereview.chromium.org/353853003
Diffstat (limited to 'tools/add_codereview_message.py')
-rwxr-xr-x | tools/add_codereview_message.py | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/tools/add_codereview_message.py b/tools/add_codereview_message.py index a7c53a9a5e..296a894062 100755 --- a/tools/add_codereview_message.py +++ b/tools/add_codereview_message.py @@ -32,38 +32,38 @@ RIETVELD_URL = 'https://codereview.chromium.org' def add_codereview_message(issue, message): - """Add a message to a given codereview. + """Add a message to a given codereview. - Args: - codereview_url: (string) we will extract the issue number from - this url, or this could simply be the issue number. - message: (string) message to add. - """ - # Passing None for the email and password will result in a prompt or - # reuse of existing cached credentials. - my_rietveld = rietveld.Rietveld(RIETVELD_URL, email=None, password=None) - - my_rietveld.add_comment(issue, message) + Args: + codereview_url: (string) we will extract the issue number from + this url, or this could simply be the issue number. + message: (string) message to add. + """ + # Passing None for the email and password will result in a prompt or + # reuse of existing cached credentials. + my_rietveld = rietveld.Rietveld(RIETVELD_URL, email=None, password=None) + + my_rietveld.add_comment(issue, message) def main(argv): - """main function; see module-level docstring and GetOptionParser help. + """main function; see module-level docstring and GetOptionParser help. - Args: - argv: sys.argv[1:]-type argument list. - """ - option_parser = optparse.OptionParser(usage=__doc__) - _, arguments = option_parser.parse_args(argv) + Args: + argv: sys.argv[1:]-type argument list. + """ + option_parser = optparse.OptionParser(usage=__doc__) + _, arguments = option_parser.parse_args(argv) - if len(arguments) > 1: - option_parser.error('Extra arguments.') - if len(arguments) != 1: - option_parser.error('Missing issue number.') + if len(arguments) > 1: + option_parser.error('Extra arguments.') + if len(arguments) != 1: + option_parser.error('Missing issue number.') - message = sys.stdin.read() - add_codereview_message(int(arguments[0]), message) + message = sys.stdin.read() + add_codereview_message(int(arguments[0]), message) if __name__ == '__main__': - main(sys.argv[1:]) + main(sys.argv[1:]) |