浏览代码

Run auto-spell-checker (codespell) on files in depot_tools.

This should only change spelling in:
 - messages that are printed
 - comments
 - docstrings

Review-Url: https://codereview.chromium.org/2277513002
qyearsley 9 年之前
父节点
当前提交
12fa6ff69b
共有 10 个文件被更改,包括 14 次插入14 次删除
  1. 1 1
      cpplint.py
  2. 1 1
      fix_encoding.py
  3. 1 1
      gcl.py
  4. 3 3
      gclient.py
  5. 1 1
      gclient_scm.py
  6. 1 1
      gerrit_util.py
  7. 3 3
      git_cl.py
  8. 1 1
      git_common.py
  9. 1 1
      presubmit_canned_checks.py
  10. 1 1
      upload_to_google_storage.py

+ 1 - 1
cpplint.py

@@ -6079,7 +6079,7 @@ def ParseArguments(args):
       try:
           _valid_extensions = set(val.split(','))
       except ValueError:
-          PrintUsage('Extensions must be comma seperated list.')
+          PrintUsage('Extensions must be comma separated list.')
 
   if not filenames:
     PrintUsage('No files were specified.')

+ 1 - 1
fix_encoding.py

@@ -356,7 +356,7 @@ def fix_win_console(encoding):
 def fix_encoding():
   """Fixes various encoding problems on all platforms.
 
-  Should be called at the very begining of the process.
+  Should be called at the very beginning of the process.
   """
   ret = True
   if sys.platform == 'win32':

+ 1 - 1
gcl.py

@@ -620,7 +620,7 @@ def LoadChangelistInfoForMultiple(changenames, local_root, fail_on_not_found,
                                   update_status):
   """Loads many changes and merge their files list into one pseudo change.
 
-  This is mainly usefull to concatenate many changes into one for a 'gcl try'.
+  This is mainly useful to concatenate many changes into one for a 'gcl try'.
   """
   changes = changenames.split(',')
   aggregate_change_info = ChangeInfo(

+ 3 - 3
gclient.py

@@ -378,7 +378,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
     # This is inherited from WorkItem.  We want the URL to be a resource.
     if url and isinstance(url, basestring):
       # The url is usually given to gclient either as https://blah@123
-      # or just https://blah.  The @123 portion is irrelevent.
+      # or just https://blah.  The @123 portion is irrelevant.
       self.resources.append(url.split('@')[0])
 
     if not self.name and self.parent:
@@ -569,7 +569,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
     # than in the os list), then it wants to use the default value.
     for os_dep_key, os_dep_value in os_overrides.iteritems():
       if len(os_dep_value) != len(target_os_list):
-        # Record the default value too so that we don't accidently
+        # Record the default value too so that we don't accidentally
         # set it to None or miss a conflicting DEPS.
         if os_dep_key in deps:
           os_dep_value.append(('default', deps[os_dep_key]))
@@ -1782,7 +1782,7 @@ def CMDrecurse(parser, args):
   """Operates [command args ...] on all the dependencies.
 
   Runs a shell command on all entries.
-  Sets GCLIENT_DEP_PATH enviroment variable as the dep's relative location to
+  Sets GCLIENT_DEP_PATH environment variable as the dep's relative location to
   root directory of the checkout.
   """
   # Stop parsing at the first non-arg so that these go through to the command

+ 1 - 1
gclient_scm.py

@@ -1647,7 +1647,7 @@ class SVNWrapper(SCMWrapper):
       self._RunAndGetFileList(['update', '--revision', 'BASE'], options,
           file_list)
     except OSError, e:
-      # Maybe the directory disapeared meanwhile. Do not throw an exception.
+      # Maybe the directory disappeared meanwhile. Do not throw an exception.
       logging.error('Failed to update:\n%s' % str(e))
 
   def revinfo(self, _options, _args, _file_list):

+ 1 - 1
gerrit_util.py

@@ -326,7 +326,7 @@ def ReadHttpResponse(conn, expect_status=200, ignore_404=True):
     # A status >=500 is assumed to be a possible transient error; retry.
     http_version = 'HTTP/%s' % ('1.1' if response.version == 11 else '1.0')
     msg = (
-        'A transient error occured while querying %s:\n'
+        'A transient error occurred while querying %s:\n'
         '%s %s %s\n'
         '%s %d %s' % (
             conn.host, conn.req_params['method'], conn.req_params['url'],

+ 3 - 3
git_cl.py

@@ -202,7 +202,7 @@ def _git_set_branch_config_value(key, value, branch=None, **kwargs):
     branch = GetCurrentBranch()
     assert branch, 'a branch name OR currently checked out branch is required'
   args = ['config']
-  # Check for boolean first, becuase bool is int, but int is not bool.
+  # Check for boolean first, because bool is int, but int is not bool.
   if value is None:
     args.append('--unset')
   elif isinstance(value, bool):
@@ -2403,7 +2403,7 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
     if not('From Gerrit Code Review' in data and 'add_ChangeId()' in data):
       return
     print('Warning: you have Gerrit commit-msg hook installed.\n'
-          'It is not neccessary for uploading with git cl in squash mode, '
+          'It is not necessary for uploading with git cl in squash mode, '
           'and may interfere with it in subtle ways.\n'
           'We recommend you remove the commit-msg hook.')
     if offer_removal:
@@ -3114,7 +3114,7 @@ def get_cl_statuses(changes, fine_grained, max_processes=None):
 
   See GetStatus() for a list of possible statuses.
   """
-  # Silence upload.py otherwise it becomes unwieldly.
+  # Silence upload.py otherwise it becomes unwieldy.
   upload.verbosity = 0
 
   if fine_grained:

+ 1 - 1
git_common.py

@@ -900,7 +900,7 @@ def tree(treeref, recurse=False):
 
   Args:
     treeref (str) - a git ref which resolves to a tree (commits count as trees).
-    recurse (bool) - include all of the tree's decendants too. File names will
+    recurse (bool) - include all of the tree's descendants too. File names will
       take the form of 'some/path/to/file'.
 
   Return format:

+ 1 - 1
presubmit_canned_checks.py

@@ -371,7 +371,7 @@ def CheckLongLines(input_api, output_api, maxlen, source_file_filter=None):
     if any((url in line) for url in ('file://', 'http://', 'https://')):
       return True
 
-    # If 'line-too-long' is explictly suppressed for the line, any length is
+    # If 'line-too-long' is explicitly suppressed for the line, any length is
     # acceptable.
     if 'pylint: disable=line-too-long' in line and file_extension == 'py':
       return True

+ 1 - 1
upload_to_google_storage.py

@@ -123,7 +123,7 @@ def get_targets(args, parser, use_null_terminator):
     parser.error('Missing target.')
 
   if len(args) == 1 and args[0] == '-':
-    # Take stdin as a newline or null seperated list of files.
+    # Take stdin as a newline or null separated list of files.
     if use_null_terminator:
       return sys.stdin.read().split('\0')
     else: