diff --git a/check_blender_release/check_static_binaries.py b/check_blender_release/check_static_binaries.py index 9662ae4e22e4b0e5f5aa306ceadd76ce55dc13b8..54981edab2c9e53195276a9484c2575767938eab 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 b028330816235702029ccc5fc8163f0a8700c37d..e8507211d137d85d5ced0e4afc87c2b827ea8e0d 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 ba08d65783d8a03ed3ea1eda7758295b083ec343..b14bb6b2980d7e0c2d53ed6e833172a8a2f84ac4 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 5ba5f16ac43ef67cd401a903f07f7b57a8ba5216..2c7656dc1f4e801397a108783e5375aff9d3ca15 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 14ca484d08aad608bf76bf6f164374e322e7d2ff..43e7bedb1497d3ebffed0523765bede8856b0ad6 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 4e16c720c3ba076c6f1a500c3d860a82ac3a5d5f..b42828a70dda79af9f0fcc15a170e33035e8d5ed 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 872b64c838bbcaa5d6686cd736dde8c1ac7a2355..c7f50708c12e4ae86176b7f314e0a8ac6c23a6dc 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 2d808c4b2d86408aa622a6cc74b01a58f8fda0f0..60bdfff4b09e0c4140e2341fd2bbf409a7d87f39 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 dfd48a40eb6f72fa2b77559e73a3b5ebbd68c0b1..6758185343f7dbff13388944f3fbc2bb81f6327f 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 80cadef0c690993384c68d992ee759cd0d647d94..a6735e78b1b9aa343ccdf7e56fee80420ded9ab9 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 b4ed1b060a1e1c73e4d480a29647ee0871b5eea6..6e530411413abb78e51b031eb262913d5fc3a32a 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 1e0239a400f8b310f49a32ee53e9d6ed12fce1d9..0970db0fa9eebf08df6fd070440be3e5e0130aca 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.