Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: tools/add_codereview_message.py

Issue 353853003: Whitespace fixes for Python tools (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/misc_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/add_codereview_message.py
diff --git a/tools/add_codereview_message.py b/tools/add_codereview_message.py
index a7c53a9a5e3ab11cd5c8fc3a8deb256506ab0bd3..296a894062f7ac222722f9a9acf9533961f671f1 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:])
« no previous file with comments | « no previous file | tools/misc_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698