From 5162393c104d6d5f0314183a084875fff68f28bb Mon Sep 17 00:00:00 2001
From: Brecht Van Lommel <brechtvanlommel@gmail.com>
Date: Fri, 19 Oct 2018 17:53:33 +0200
Subject: [PATCH] Spelling fixes in comments and descriptions, patch by luzpaz.

Differential Revision: https://developer.blender.org/D3747
---
 check_blender_release/check_static_binaries.py |  2 +-
 check_source/check_style_c.py                  | 18 +++++++++---------
 utils/blend2json.py                            |  2 +-
 utils/blender_theme_as_c.py                    |  2 +-
 utils/cycles_timeit.py                         |  6 +++---
 utils/git_log_review_commits.py                |  2 +-
 utils/git_log_review_commits_advanced.py       |  4 ++--
 utils/header_clean.py                          |  2 +-
 utils/rna_manual_reference_updater.py          |  2 +-
 utils_build/cmake-flags                        |  6 +++---
 .../externaltools/qtc_cpp_to_c_comments.py     |  2 +-
 utils_ide/qtcreator/readme.rst                 |  4 ++--
 12 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/check_blender_release/check_static_binaries.py b/check_blender_release/check_static_binaries.py
index 9662ae4..54981ed 100644
--- a/check_blender_release/check_static_binaries.py
+++ b/check_blender_release/check_static_binaries.py
@@ -138,7 +138,7 @@ def stripLibraryABI(lib_name):
     Example; libexample.so.1.0 => libexample.so
     """
     lib_name_no_abi = lib_name
-    # TOOD(sergey): Optimize this!
+    # TODO(sergey): Optimize this!
     while True:
         no_abi = re.sub(r"\.[0-9]+$", "", lib_name_no_abi)
         if lib_name_no_abi == no_abi:
diff --git a/check_source/check_style_c.py b/check_source/check_style_c.py
index b028330..e850721 100755
--- a/check_source/check_style_c.py
+++ b/check_source/check_style_c.py
@@ -278,7 +278,7 @@ def extract_cast(index):
     # to detect a cast is quite involved... sigh
     # assert(tokens[index].text == "(")
 
-    # TODO, comment within cast, but thats rare
+    # TODO, comment within cast, but that's rare
     i_start = index
     i_end = tk_match_backet(index)
 
@@ -429,7 +429,7 @@ def blender_check_kw_if(index_kw_start, index_kw, index_kw_end):
             # if (a &&
             #     b); <--
             #
-            # While possible but not common for 'if' statements, its used in this example:
+            # While possible but not common for 'if' statements, it's used in this example:
             #
             # do {
             #     foo;
@@ -496,7 +496,7 @@ def blender_check_kw_if(index_kw_start, index_kw, index_kw_end):
                         tokens[index_kw].text, index_kw, index_kw_end)
 
         # Note: this could be split into its own function
-        # since its not specific to if-statements,
+        # since it's not specific to if-statements,
         # can also work for function calls.
         #
         # check indentation on a multi-line statement:
@@ -722,7 +722,7 @@ def blender_check_cast(index_kw_start, index_kw_end):
             elif tokens[i - 1].text.isspace():
                 pass
             else:
-                warning("E124", "cast has no preceeding whitespace '(type*)'", index_kw_start, index_kw_end)
+                warning("E124", "cast has no preceding whitespace '(type*)'", index_kw_start, index_kw_end)
 
 
 def blender_check_comma(index_kw):
@@ -816,7 +816,7 @@ def blender_check_operator(index_start, index_end, op_text, is_cpp):
             if tokens[index_prev].flag & IS_CAST:
                 index_prev = tk_advance_flag(index_prev, -1, IS_CAST)
 
-            # This check could be improved, its a bit fuzzy
+            # This check could be improved, it's a bit fuzzy
             if ((tokens[index_start - 1].flag & IS_CAST) or
                     (tokens[index_start + 1].flag & IS_CAST)):
                 # allow:
@@ -956,10 +956,10 @@ def blender_check_function_definition(i):
     while tokens[i_prev].text == "":
         i_prev -= 1
 
-    # ensure this isnt '{' in its own line
+    # ensure this isn't '{' in its own line
     if tokens[i_prev].line == tokens[i].line:
 
-        # check we '}' isnt on same line...
+        # check we '}' isn't on same line...
         i_next = i + 1
         found = False
         while tokens[i_next].line == tokens[i].line:
@@ -971,7 +971,7 @@ def blender_check_function_definition(i):
 
         if found is False:
 
-            # First check this isnt an assignment
+            # First check this isn't an assignment
             i_prev = tk_advance_no_ws(i, -1)
             # avoid '= {'
             # if tokens(index_prev).text != "="
@@ -1126,7 +1126,7 @@ def quick_check_indentation(lines):
             tabs = l[:len(l) - len(ls)]
             t = len(tabs)
             if (t > t_prev + 1) and (t_prev != -1):
-                warning_lineonly("E146", "indentation mis-match (indent of %d) '%s'" %
+                warning_lineonly("E146", "indentation mismatch (indent of %d) '%s'" %
                                  (t - t_prev, tabs), i + 1)
             t_prev = t
 
diff --git a/utils/blend2json.py b/utils/blend2json.py
index ba08d65..b14bb6b 100755
--- a/utils/blend2json.py
+++ b/utils/blend2json.py
@@ -94,7 +94,7 @@ del sys
 import blendfile
 
 
-##### Utils (own json formating) #####
+##### Utils (own json formatting) #####
 
 
 def json_default(o):
diff --git a/utils/blender_theme_as_c.py b/utils/blender_theme_as_c.py
index 5ba5f16..2c7656d 100755
--- a/utils/blender_theme_as_c.py
+++ b/utils/blender_theme_as_c.py
@@ -311,7 +311,7 @@ def file_remove_empty_braces(source_dst):
     def key_replace(match):
         return ""
     data_prev = None
-    # Braces may become emtpy by removing nested
+    # Braces may become empty by removing nested
     while data != data_prev:
         data_prev = data
         data = re.sub(
diff --git a/utils/cycles_timeit.py b/utils/cycles_timeit.py
index 14ca484..43e7bed 100755
--- a/utils/cycles_timeit.py
+++ b/utils/cycles_timeit.py
@@ -98,7 +98,7 @@ def humanReadableTimeToSeconds(time):
     return result
 
 #########################################
-# Benchmark specific helper funcitons.
+# Benchmark specific helper functions.
 
 def configureArgumentParser():
     parser = argparse.ArgumentParser(
@@ -117,13 +117,13 @@ def configureArgumentParser():
 
 def benchmarkFile(blender, blendfile, stats):
     logHeader("Begin benchmark of file {}" . format(blendfile))
-    # Pepare some regex for parsing
+    # Prepare some regex for parsing
     re_path_tracing = re.compile(".*Path Tracing Tile ([0-9]+)/([0-9]+)$")
     re_total_render_time = re.compile(".*Total render time: ([0-9]+(\.[0-9]+)?)")
     re_render_time_no_sync = re.compile(
         ".*Render time \(without synchronization\): ([0-9]+(\.[0-9]+)?)")
     re_pipeline_time = re.compile("Time: ([0-9:\.]+) \(Saving: ([0-9:\.]+)\)")
-    # Prepare outout folder.
+    # Prepare output folder.
     # TODO(sergey): Use some proper output folder.
     output_folder = "/tmp/"
     # Configure command for the current file.
diff --git a/utils/git_log_review_commits.py b/utils/git_log_review_commits.py
index 4e16c72..b42828a 100755
--- a/utils/git_log_review_commits.py
+++ b/utils/git_log_review_commits.py
@@ -231,7 +231,7 @@ def main():
 
         sha1 = c.sha1
 
-        # diff may scroll off the screen, thats OK
+        # diff may scroll off the screen, that's OK
         os.system("git --git-dir %s show %s --format=%%n" % (c._git_dir, sha1.decode('ascii')))
         print("")
         print_commit(c)
diff --git a/utils/git_log_review_commits_advanced.py b/utils/git_log_review_commits_advanced.py
index 872b64c..c7f5070 100755
--- a/utils/git_log_review_commits_advanced.py
+++ b/utils/git_log_review_commits_advanced.py
@@ -570,7 +570,7 @@ def argparse_create():
     parser.add_argument(
         "--blender-rstate-list", dest="blender_rstate_list",
         default="", required=False, type=lambda s: s.split(","),
-        help=("Blender release state(s) to additionaly list in their own sections "
+        help=("Blender release state(s) to additionally list in their own sections "
               "(e.g. pass 'RC2' to list fixes between RC1 and RC2, ie tagged as RC2, etc.)"))
 
     return parser
@@ -680,7 +680,7 @@ def main():
 
         sha1 = c.sha1
 
-        # diff may scroll off the screen, thats OK
+        # diff may scroll off the screen, that's OK
         os.system("git --git-dir %s show %s --format=%%n" % (c._git_dir, sha1.decode('ascii')))
         print("")
         print_commit(c)
diff --git a/utils/header_clean.py b/utils/header_clean.py
index 2d808c4..60bdfff 100755
--- a/utils/header_clean.py
+++ b/utils/header_clean.py
@@ -28,7 +28,7 @@ we could change this if it's needed.
 
 Ensures headers are NOT removed:
 
-- They aren't used in the current build configuation.
+- They aren't used in the current build configuration.
 - They are needed but happen to be indirectly included by another header.
 - They use '#include <...>', instead of quotes (keep system headers).
 """
diff --git a/utils/rna_manual_reference_updater.py b/utils/rna_manual_reference_updater.py
index dfd48a4..6758185 100644
--- a/utils/rna_manual_reference_updater.py
+++ b/utils/rna_manual_reference_updater.py
@@ -59,7 +59,7 @@ file = open(filepath, "w", encoding="utf-8")
 fw = file.write
 
 fw("# Do not edit this file.")
-fw(" This file is auto genereated from rna_manual_reference_updater.py\n\n")
+fw(" This file is auto generated from rna_manual_reference_updater.py\n\n")
 fw("import bpy\n\n")
 fw("url_manual_prefix = \"https://docs.blender.org/manual/en/dev/\"\n\n")
 fw("language = \"\"\n")
diff --git a/utils_build/cmake-flags b/utils_build/cmake-flags
index 80cadef..a6735e7 100755
--- a/utils_build/cmake-flags
+++ b/utils_build/cmake-flags
@@ -229,7 +229,7 @@ def cmake_flag_buildtype_suffix(flag, build_type):
 # CMakeCache.txt is converted into a dict
 # the key is the cache ID
 # the value is a triple (type, value, description, internal)
-# where the discription is the comment above conforming to the CMake convention.
+# where the description is the comment above conforming to the CMake convention.
 #
 #
 def cmakecache_to_py(filepath, native=True):
@@ -248,7 +248,7 @@ def cmakecache_to_py(filepath, native=True):
             else:
                 break
 
-        # incase its not set
+        # in case it's not set
         cmake_descr = ""
         cmake_internal = False
 
@@ -275,7 +275,7 @@ def cmakecache_to_py(filepath, native=True):
 
                 cmake_cache[cmake_name] = (cmake_type, cmake_value, cmake_descr, cmake_internal)
 
-                # incase its not set
+                # in case it's not set
                 cmake_descr = ""
 
     return cmake_header, cmake_cache
diff --git a/utils_ide/qtcreator/externaltools/qtc_cpp_to_c_comments.py b/utils_ide/qtcreator/externaltools/qtc_cpp_to_c_comments.py
index b4ed1b0..6e53041 100755
--- a/utils_ide/qtcreator/externaltools/qtc_cpp_to_c_comments.py
+++ b/utils_ide/qtcreator/externaltools/qtc_cpp_to_c_comments.py
@@ -63,7 +63,7 @@ while "//" not in data[i] and i > len(data):
 
 
 for i, l in enumerate(data):
-    if "//" in l:  # should check if its in a string.
+    if "//" in l:  # should check if it's in a string.
 
         text, comment = l.split("//", 1)
 
diff --git a/utils_ide/qtcreator/readme.rst b/utils_ide/qtcreator/readme.rst
index 1e0239a..0970db0 100644
--- a/utils_ide/qtcreator/readme.rst
+++ b/utils_ide/qtcreator/readme.rst
@@ -33,12 +33,12 @@ saving it to a file in the same path with an ".asm" extension.
 
 This can be handy for checking if the compiler is really optimizing out code as expected.
 
-Or if some change really does't change any functionality.
+Or if some change really doesn't change any functionality.
 
 The way it works is to get a list of the build commands that would run, and get those commands for the current file.
 
 Then this command runs, swapping out object creation args for arguments that create the assembly.
 
-.. note:: It would be nice to open this file, but currently this isnt supported. its just created along side the source.
+.. note:: It would be nice to open this file, but currently this isn't supported. It's just created along side the source.
 
 .. note:: Currently only GCC is supported.
-- 
GitLab