diff options
Diffstat (limited to 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/bl_i18n_utils/bl_extract_messages.py | 3 | ||||
-rw-r--r-- | release/scripts/modules/bl_i18n_utils/settings.py | 4 | ||||
-rw-r--r-- | release/scripts/modules/bl_i18n_utils/utils_spell_check.py | 2 | ||||
-rw-r--r-- | release/scripts/modules/bpy_extras/keyconfig_utils.py | 2 | ||||
-rw-r--r-- | release/scripts/modules/bpy_restrict_state.py | 6 | ||||
-rw-r--r-- | release/scripts/modules/bpyml_ui.py | 2 | ||||
-rw-r--r-- | release/scripts/modules/nodeitems_utils.py | 6 | ||||
-rw-r--r-- | release/scripts/modules/rna_prop_ui.py | 2 | ||||
-rw-r--r-- | release/scripts/modules/rna_xml.py | 2 | ||||
-rw-r--r-- | release/scripts/modules/sys_info.py | 2 |
10 files changed, 18 insertions, 13 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py index 835d1fc5195..d434c6a79cd 100644 --- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py +++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py @@ -62,6 +62,7 @@ def _gen_check_ctxt(settings): "spell_errors": {}, } + def _diff_check_ctxt(check_ctxt, minus_check_ctxt): """Returns check_ctxt - minus_check_ctxt""" for key in check_ctxt: @@ -74,6 +75,7 @@ def _diff_check_ctxt(check_ctxt, minus_check_ctxt): if warning in check_ctxt[key]: del check_ctxt[key][warning] + def _gen_reports(check_ctxt): return { "check_ctxt": check_ctxt, @@ -473,7 +475,6 @@ def dump_py_messages_from_files(msgs, reports, files, settings): return [_extract_string_merge(estr_ls, nds_ls) for estr_ls, nds_ls in bag] - i18n_ctxt_ids = {v for v in bpy.app.translations.contexts_C_to_py.values()} def _ctxt_to_ctxt(node): # We must try, to some extend, to get contexts from vars instead of only literal strings... diff --git a/release/scripts/modules/bl_i18n_utils/settings.py b/release/scripts/modules/bl_i18n_utils/settings.py index 300cd7ae955..0e08731c658 100644 --- a/release/scripts/modules/bl_i18n_utils/settings.py +++ b/release/scripts/modules/bl_i18n_utils/settings.py @@ -473,6 +473,7 @@ for p in set(INTERN_PY_SYS_PATHS.split(";")): def _do_get(ref, path): return os.path.normpath(os.path.join(ref, path)) + def _do_set(ref, path): path = os.path.normpath(path) # If given path is absolute, make it relative to current ref one (else we consider it is already the case!) @@ -484,6 +485,7 @@ def _do_set(ref, path): pass return path + def _gen_get_set_path(ref, name): def _get(self): return _do_get(getattr(self, ref), getattr(self, name)) @@ -491,6 +493,7 @@ def _gen_get_set_path(ref, name): setattr(self, name, _do_set(getattr(self, ref), value)) return _get, _set + def _gen_get_set_paths(ref, name): def _get(self): return [_do_get(getattr(self, ref), p) for p in getattr(self, name)] @@ -498,6 +501,7 @@ def _gen_get_set_paths(ref, name): setattr(self, name, [_do_set(getattr(self, ref), p) for p in value]) return _get, _set + class I18nSettings: """ Class allowing persistence of our settings! diff --git a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py index b77c636640a..ee83c6cc3c9 100644 --- a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py +++ b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py @@ -24,7 +24,7 @@ import pickle import re -class SpellChecker(): +class SpellChecker: """ A basic spell checker. """ diff --git a/release/scripts/modules/bpy_extras/keyconfig_utils.py b/release/scripts/modules/bpy_extras/keyconfig_utils.py index 3f5a23683ee..abc613bfa14 100644 --- a/release/scripts/modules/bpy_extras/keyconfig_utils.py +++ b/release/scripts/modules/bpy_extras/keyconfig_utils.py @@ -245,7 +245,7 @@ def keyconfig_export(wm, kc, filepath): # the default blender keyconfig, recreating the current setup from a fresh blender # without needing to export keymaps which haven't been edited. - class FakeKeyConfig(): + class FakeKeyConfig: keymaps = [] edited_kc = FakeKeyConfig() for km in wm.keyconfigs.user.keymaps: diff --git a/release/scripts/modules/bpy_restrict_state.py b/release/scripts/modules/bpy_restrict_state.py index 4aa3c5de573..4658fddf0dc 100644 --- a/release/scripts/modules/bpy_restrict_state.py +++ b/release/scripts/modules/bpy_restrict_state.py @@ -29,7 +29,7 @@ __all__ = ( import bpy as _bpy -class _RestrictContext(): +class _RestrictContext: __slots__ = () _real_data = _bpy.data # safe, the pointer never changes @@ -44,7 +44,7 @@ class _RestrictContext(): return self._real_pref -class _RestrictData(): +class _RestrictData: __slots__ = () @@ -52,7 +52,7 @@ _context_restrict = _RestrictContext() _data_restrict = _RestrictData() -class RestrictBlend(): +class RestrictBlend: __slots__ = ("context", "data") def __enter__(self): diff --git a/release/scripts/modules/bpyml_ui.py b/release/scripts/modules/bpyml_ui.py index b4ad4e0b54a..dd5fc38d0eb 100644 --- a/release/scripts/modules/bpyml_ui.py +++ b/release/scripts/modules/bpyml_ui.py @@ -84,7 +84,7 @@ def _call_recursive(context, base, py_node): _call_recursive(context, base_new, py_node_child) -class BPyML_BaseUI(): +class BPyML_BaseUI: """ This is a mix-in class that defines a draw function which checks for draw_data diff --git a/release/scripts/modules/nodeitems_utils.py b/release/scripts/modules/nodeitems_utils.py index 1fef6c3a019..2882a08fbd4 100644 --- a/release/scripts/modules/nodeitems_utils.py +++ b/release/scripts/modules/nodeitems_utils.py @@ -20,7 +20,7 @@ import bpy -class NodeCategory(): +class NodeCategory: @classmethod def poll(cls, context): return True @@ -42,7 +42,7 @@ class NodeCategory(): self.items = items_gen -class NodeItem(): +class NodeItem: def __init__(self, nodetype, label=None, settings={}, poll=None): self.nodetype = nodetype self._label = label @@ -73,7 +73,7 @@ class NodeItem(): ops.value = setting[1] -class NodeItemCustom(): +class NodeItemCustom: def __init__(self, poll=None, draw=None): self.poll = poll self.draw = draw diff --git a/release/scripts/modules/rna_prop_ui.py b/release/scripts/modules/rna_prop_ui.py index e278b0d20fe..f4649453b46 100644 --- a/release/scripts/modules/rna_prop_ui.py +++ b/release/scripts/modules/rna_prop_ui.py @@ -168,7 +168,7 @@ def draw(layout, context, context_member, property_type, use_edit=True): assign_props(props, val_draw, key) -class PropertyPanel(): +class PropertyPanel: """ The subclass should have its own poll function and the variable '_context_path' MUST be set. diff --git a/release/scripts/modules/rna_xml.py b/release/scripts/modules/rna_xml.py index 41f890de51f..729d6238ac3 100644 --- a/release/scripts/modules/rna_xml.py +++ b/release/scripts/modules/rna_xml.py @@ -331,7 +331,7 @@ def xml2rna(root_xml, rna2xml_node(child_xml_real, subsubvalue) else: -# print(elems) + # print(elems) if len(elems) == 1: # sub node named by its type diff --git a/release/scripts/modules/sys_info.py b/release/scripts/modules/sys_info.py index cecb2a767ef..74a6f4c36e8 100644 --- a/release/scripts/modules/sys_info.py +++ b/release/scripts/modules/sys_info.py @@ -153,7 +153,7 @@ def write_sysinfo(op): else: output.write("\nOpenGL\n") output.write(lilies) - version = bgl.glGetString(bgl.GL_RENDERER); + version = bgl.glGetString(bgl.GL_RENDERER) output.write("renderer:\t%r\n" % version) output.write("vendor:\t\t%r\n" % (bgl.glGetString(bgl.GL_VENDOR))) output.write("version:\t%r\n" % (bgl.glGetString(bgl.GL_VERSION))) |