Cleanup: spelling in comments, update dictionary

This commit is contained in:
Campbell Barton
2023-09-03 21:35:03 +10:00
parent 9af2291541
commit e8c812a307
59 changed files with 131 additions and 98 deletions
@@ -43,7 +43,7 @@ def reduce_newlines(text):
def reduce_spaces(text):
"""Reduces multiple whitespaces to a single space.
"""Reduces multiple white-spaces to a single space.
:arg text: text with multiple spaces
:type text: str
@@ -100,7 +100,7 @@ def get_argspec(func, *, strip_self=True, doc=None, source=None):
func_name = func.__name__
except AttributeError:
return ''
# from docstring
# From doc-string.
if doc is None:
doc = get_doc(func)
match = re.search(DEF_DOC % func_name, doc, RE_FLAG)
@@ -4,7 +4,7 @@
# Copyright (c) 2009 Fernando Perez, www.stani.be
# Original copyright (see docstring):
# Original copyright (see doc-string):
# ****************************************************************************
# Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu>
#
@@ -175,6 +175,6 @@ def complete(line):
return filter_prefix(try_import(mod), words[-1])
# get here if the import is not found
# import invalidmodule
# ^, in this case return nothing
# import invalid_module
# ^, in this case return nothing
return []
@@ -81,7 +81,7 @@ def complete(line, cursor, namespace, private):
def expand(line, cursor, namespace, *, private=True):
"""This method is invoked when the user asks autocompletion,
"""This method is invoked when the user asks auto-completion,
e.g. when Ctrl+Space is clicked.
:arg line: incomplete text line
+7 -7
View File
@@ -108,10 +108,10 @@ IMPORT_LANGUAGES_RTL = {
'ar_EG', 'fa_IR', 'he_IL',
}
# The comment prefix used in generated messages.txt file.
# The comment prefix used in generated `messages.txt` file.
MSG_COMMENT_PREFIX = "#~ "
# The comment prefix used in generated messages.txt file.
# The comment prefix used in generated `messages.txt` file.
MSG_CONTEXT_PREFIX = "MSGCTXT:"
# The default comment prefix used in po's.
@@ -514,12 +514,12 @@ if not os.path.exists(BLENDER_EXEC):
# The gettext msgfmt "compiler". Youll likely have to edit it in your user_settings.py if youre under Windows.
GETTEXT_MSGFMT_EXECUTABLE = "msgfmt"
# The FriBidi C compiled library (.so under Linux, .dll under windows...).
# Youll likely have to edit it in your user_settings.py if youre under Windows., e.g. using the included one:
# FRIBIDI_LIB = os.path.join(TOOLS_DIR, "libfribidi.dll")
# The FriBidi C compiled library (.so under Linux, `.dll` under windows...).
# Youll likely have to edit it in your `user_settings.py` if youre under Windows., e.g. using the included one:
# `FRIBIDI_LIB = os.path.join(TOOLS_DIR, "libfribidi.dll")`
FRIBIDI_LIB = "libfribidi.so.0"
# The name of the (currently empty) file that must be present in a po's directory to enable rtl-preprocess.
# The name of the (currently empty) file that must be present in a po's directory to enable RTL-preprocess.
RTL_PREPROCESS_FILE = "is_rtl"
# The Blender source root path.
@@ -565,7 +565,7 @@ ASSET_CATALOG_FILE = "blender_assets.cats.txt"
# The template messages file (relative to I18N_DIR).
REL_FILE_NAME_POT = os.path.join(REL_BRANCHES_DIR, DOMAIN + ".pot")
# Mo root datapath.
# Mo root data-path.
REL_MO_PATH_ROOT = os.path.join(REL_TRUNK_DIR, "locale")
# Mo path generator for a given language.
@@ -41,7 +41,7 @@ def gen_menu_file(stats, settings):
highest_uid = 0
for lvl, uid_num, label, uid, flag in stats:
if lvl < limits[idx][0]:
# Sub-sort languages by iso-codes.
# Sub-sort languages by ISO-codes.
langs_cats[idx].sort(key=lambda it: it[2])
idx += 1
if lvl < settings.IMPORT_MIN_LEVEL and flag == OK:
@@ -49,7 +49,7 @@ def gen_menu_file(stats, settings):
langs_cats[idx].append((uid_num, label, uid, flag))
if abs(uid_num) > highest_uid:
highest_uid = abs(uid_num)
# Sub-sort last group of languages by iso-codes!
# Sub-sort last group of languages by ISO-codes!
langs_cats[idx].sort(key=lambda it: it[2])
data_lines = [
"# File used by Blender to know which languages (translations) are available, ",
@@ -756,7 +756,7 @@ class SpellChecker:
"hc",
"hdc",
"hdr", "hdri", "hdris",
"hh", "mm", "ss", "ff", # hh:mm:ss:ff timecode
"hh", "mm", "ss", "ff", # `hh:mm:ss:ff` time-code.
"hpg", # Intel Xe-HPG architecture
"hsv", "hsva", "hsl",
"id",
+1 -1
View File
@@ -287,7 +287,7 @@ def bake_action_iter(
while pbone.constraints:
pbone.constraints.remove(pbone.constraints[0])
# Create compatible eulers, quats.
# Create compatible euler & quaternion rotation values.
euler_prev = None
quat_prev = None
+4 -4
View File
@@ -233,19 +233,19 @@ def edge_loops_from_edges(mesh, edges=None):
def ngon_tessellate(from_data, indices, fix_loops=True, debug_print=True):
"""
Takes a polyline of indices (ngon) and returns a list of face
Takes a poly-line of indices (ngon) and returns a list of face
index lists. Designed to be used for importers that need indices for an
ngon to create from existing verts.
:arg from_data: either a mesh, or a list/tuple of vectors.
:type from_data: list or :class:`bpy.types.Mesh`
:arg indices: a list of indices to use this list
is the ordered closed polyline
is the ordered closed poly-line
to fill, and can be a subset of the data given.
:type indices: list
:arg fix_loops: If this is enabled polylines
:arg fix_loops: If this is enabled poly-lines
that use loops to make multiple
polylines are delt with correctly.
poly-lines are dealt with correctly.
:type fix_loops: bool
"""
+1 -1
View File
@@ -159,7 +159,7 @@ def location_3d_to_region_2d(region, rv3d, coord, *, default=None):
:type region: :class:`bpy.types.Region`
:arg rv3d: 3D region data, typically bpy.context.space_data.region_3d.
:type rv3d: :class:`bpy.types.RegionView3D`
:arg coord: 3d worldspace location.
:arg coord: 3d world-space location.
:type coord: 3d vector
:arg default: Return this value if ``coord``
is behind the origin of a perspective view.