From 4cd827870df3ac5b94e0e45ca7ebfed4e40d2d86 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 2 Feb 2025 13:56:44 +1100 Subject: [PATCH] Cleanup: quiet check_spelling_* targets Also correct outdated references to `ghash`. --- build_files/utils/make_source_archive.py | 10 +++++----- build_files/utils/make_update.py | 2 +- doc/python_api/examples/blf.py | 2 +- doc/python_api/examples/bpy.types.Depsgraph.5.py | 2 +- doc/python_api/examples/mathutils.Vector.py | 2 +- .../draw/engines/overlay/overlay_next_armature.hh | 2 +- .../shaders/overlay_armature_shape_wire_vert.glsl | 4 ++-- .../blender/gpu/shaders/metal/mtl_shader_defines.msl | 4 +++- source/blender/io/alembic/tests/abc_export_test.cc | 2 +- source/blender/io/alembic/tests/abc_matrix_test.cc | 2 +- source/blender/python/intern/bpy_app_translations.cc | 6 +++--- 11 files changed, 20 insertions(+), 18 deletions(-) diff --git a/build_files/utils/make_source_archive.py b/build_files/utils/make_source_archive.py index 1654b605d91..90643da5e95 100755 --- a/build_files/utils/make_source_archive.py +++ b/build_files/utils/make_source_archive.py @@ -89,11 +89,11 @@ def manifest_path(tarball: Path) -> Path: """Return the manifest path for the given tarball path. >>> from pathlib import Path - >>> tarball = Path("/home/sybren/workspace/blender-git/blender-test.tar.gz") + >>> tarball = Path("/home/user/workspace/blender-git/blender-test.tar.gz") >>> manifest_path(tarball).as_posix() - '/home/sybren/workspace/blender-git/blender-test-manifest.txt' + '/home/user/workspace/blender-git/blender-test-manifest.txt' """ - # ".tar.gz" is seen as two suffixes. + # Note that `.tar.gz` is seen as two suffixes. without_suffix = tarball.with_suffix("").with_suffix("") name = without_suffix.name return without_suffix.with_name(f"{name}-manifest.txt") @@ -105,8 +105,8 @@ def packages_path(current_directory: Path, cli_args: Any) -> Union[Path, None]: abspath = cli_args.include_packages.absolute() - # os.path.relpath() can return paths like "../../packages", where - # Path.relative_to() will not go up directories (so its return value never + # `os.path.relpath()` can return paths like "../../packages", where + # `Path.relative_to()` will not go up directories (so its return value never # has "../" in there). relpath = os.path.relpath(abspath, current_directory) diff --git a/build_files/utils/make_update.py b/build_files/utils/make_update.py index 2d99da040ae..04641217707 100755 --- a/build_files/utils/make_update.py +++ b/build_files/utils/make_update.py @@ -266,7 +266,7 @@ def use_upstream_workflow(args: argparse.Namespace) -> bool: def work_tree_update_upstream_workflow(args: argparse.Namespace, use_fetch: bool = True) -> str: """ - Update the Blender repository using the Github style of fork organization + Update the Blender repository using the GitHub style of fork organization Returns true if the current local branch has been updated to the upstream state. Otherwise false is returned. diff --git a/doc/python_api/examples/blf.py b/doc/python_api/examples/blf.py index 50b67f5efaa..ec716d16e08 100644 --- a/doc/python_api/examples/blf.py +++ b/doc/python_api/examples/blf.py @@ -18,7 +18,7 @@ font_info = { def init(): """init function - runs once""" import os - # Create a new font object, use external ttf file. + # Create a new font object, use external TTF file. font_path = bpy.path.abspath('//Zeyada.ttf') # Store the font indice - to use later. if os.path.exists(font_path): diff --git a/doc/python_api/examples/bpy.types.Depsgraph.5.py b/doc/python_api/examples/bpy.types.Depsgraph.5.py index 4811f77bbdf..523145968fe 100644 --- a/doc/python_api/examples/bpy.types.Depsgraph.5.py +++ b/doc/python_api/examples/bpy.types.Depsgraph.5.py @@ -11,7 +11,7 @@ animation or modifiers into account: - For meshes this is similar to duplicating the source mesh. - For curves this disables own modifiers, and modifiers of objects used as bevel and taper. -- For metaballs this produces an empty mesh since polygonization is done as a modifier evaluation. +- For meta-balls this produces an empty mesh since polygonization is done as a modifier evaluation. When is used on evaluated object all modifiers are taken into account. diff --git a/doc/python_api/examples/mathutils.Vector.py b/doc/python_api/examples/mathutils.Vector.py index 4d8bf8c065c..8b94997291b 100644 --- a/doc/python_api/examples/mathutils.Vector.py +++ b/doc/python_api/examples/mathutils.Vector.py @@ -12,7 +12,7 @@ vec2d = mathutils.Vector((1.0, 2.0)) vec3d = mathutils.Vector((1.0, 0.0, 0.0)) vec4d = vec_a.to_4d() -# other mathutuls types +# Other `mathutils` types. quat = mathutils.Quaternion() matrix = mathutils.Matrix() diff --git a/source/blender/draw/engines/overlay/overlay_next_armature.hh b/source/blender/draw/engines/overlay/overlay_next_armature.hh index c8bee4d156d..fdfbef46d89 100644 --- a/source/blender/draw/engines/overlay/overlay_next_armature.hh +++ b/source/blender/draw/engines/overlay/overlay_next_armature.hh @@ -606,7 +606,7 @@ class Armatures : Overlay { } for (CustomShapeBuf item : bb.custom_shape_wire.items()) { /* WORKAROUND: This shape needs a special vertex shader path that should be triggered by - * its vclass attribute. However, to avoid many changes in the primitive expansion API, + * its `vclass` attribute. However, to avoid many changes in the primitive expansion API, * we create a specific path inside the shader only for this shape batch and infer the * value of the `vclass` attribute based on the vertex index. */ if (item.key == arrow_batch) { diff --git a/source/blender/draw/engines/overlay/shaders/overlay_armature_shape_wire_vert.glsl b/source/blender/draw/engines/overlay/shaders/overlay_armature_shape_wire_vert.glsl index ef18001ad13..e4798d0c32a 100644 --- a/source/blender/draw/engines/overlay/shaders/overlay_armature_shape_wire_vert.glsl +++ b/source/blender/draw/engines/overlay/shaders/overlay_armature_shape_wire_vert.glsl @@ -40,12 +40,12 @@ VertOut vertex_main(VertIn v_in) VertOut v_out; /* WORKAROUND: This shape needs a special vertex shader path that should be triggered by - * its vclass attribute. However, to avoid many changes in the primitive expansion API, + * its `vclass` attribute. However, to avoid many changes in the primitive expansion API, * we create a specific path inside the shader only for this shape batch and infer the * value of the `vclass` attribute based on the vertex index. */ if (use_arrow_drawing) { /* Keep in sync with the arrows shape batch creation. */ - /* Adapted from overlay_extra_vert.glsl. */ + /* Adapted from `overlay_extra_vert.glsl`. */ vec3 vpos = v_in.lP; vec3 vofs = vec3(0.0); uint axis = uint(vpos.z); diff --git a/source/blender/gpu/shaders/metal/mtl_shader_defines.msl b/source/blender/gpu/shaders/metal/mtl_shader_defines.msl index 0b9ef95f80a..98c9c852cc2 100644 --- a/source/blender/gpu/shaders/metal/mtl_shader_defines.msl +++ b/source/blender/gpu/shaders/metal/mtl_shader_defines.msl @@ -199,10 +199,12 @@ struct _mtl_sampler { * it for linear storage. * For instance, for a [2,2,2] texture store in a [6x4] backing texture: * + * \code{.unparsed} * 001122 * 334455 * 667788 * xxxxxx + * \endcode * * The numbers are rows in the 3D texture. */ @@ -216,7 +218,7 @@ struct _mtl_sampler { /* Convert 3D coordinates to the backing 2D texture coordinates. */ int2 to_internal_coord(thread TextureT *texture, IntCoord coord) const { - /* Index of a pixel in the data array. Assuming data layout is scanline. */ + /* Index of a pixel in the data array. Assuming data layout is scan-line. */ uint linear_pixel = uint(coord.x) + uint(coord.y) * texture_size.x + uint(coord.z) * (texture_size.x * texture_size.y); diff --git a/source/blender/io/alembic/tests/abc_export_test.cc b/source/blender/io/alembic/tests/abc_export_test.cc index 9f062b1ce57..09a85eafd45 100644 --- a/source/blender/io/alembic/tests/abc_export_test.cc +++ b/source/blender/io/alembic/tests/abc_export_test.cc @@ -4,7 +4,7 @@ #include "testing/testing.h" -/* Keep first since utildefines defines AT which conflicts with STL */ +/* Keep first since `BLI_utildefines.h` defines `AT` which conflicts with STL. */ #include "exporter/abc_archive.h" #include "BKE_main.hh" diff --git a/source/blender/io/alembic/tests/abc_matrix_test.cc b/source/blender/io/alembic/tests/abc_matrix_test.cc index 6dcbf715f4b..9ce552d20d0 100644 --- a/source/blender/io/alembic/tests/abc_matrix_test.cc +++ b/source/blender/io/alembic/tests/abc_matrix_test.cc @@ -4,7 +4,7 @@ #include "testing/testing.h" -/* Keep first since utildefines defines AT which conflicts with STL. */ +/* Keep first since `BLI_utildefines.h` defines `AT` which conflicts with STL. */ #include "intern/abc_axis_conversion.h" #include "BLI_math_base.h" diff --git a/source/blender/python/intern/bpy_app_translations.cc b/source/blender/python/intern/bpy_app_translations.cc index e7a4389251b..8de3813e6a5 100644 --- a/source/blender/python/intern/bpy_app_translations.cc +++ b/source/blender/python/intern/bpy_app_translations.cc @@ -139,7 +139,7 @@ static void _build_translations_cache(PyObject *py_messages, const char *locale) BLT_lang_locale_explode( locale, &language, nullptr, nullptr, &language_country, &language_variant); - /* Clear the cached ghash if needed, and create a new one. */ + /* Clear the cached #blender::Map if needed, and create a new one. */ _clear_translations_cache(); get_translations_cache() = std::make_unique>(); @@ -185,7 +185,7 @@ static void _build_translations_cache(PyObject *py_messages, const char *locale) continue; } - /* Iterate over all translations of the found language dict, and populate our ghash cache. */ + /* Iterate over all translations of the found language dict and populate our cache. */ while (PyDict_Next(lang_dict, &ppos, &pykey, &trans)) { const char *msgctxt = nullptr, *msgid = nullptr; bool invalid_key = false; @@ -389,7 +389,7 @@ static PyObject *app_translations_py_messages_unregister(BlenderAppTranslations if (PyDict_Contains(self->py_messages, module_name)) { PyDict_DelItem(self->py_messages, module_name); - /* Clear cached messages ghash! */ + /* Clear cached messages map. */ _clear_translations_cache(); } #else