Cleanup: quiet Python linter warnings

This commit is contained in:
Campbell Barton
2024-12-11 11:26:24 +11:00
parent 560b6e2831
commit a7bc3e3418
25 changed files with 49 additions and 38 deletions

View File

@@ -45,6 +45,6 @@ class RestrictBlend:
_bpy.data = _data_restrict
_bpy.context = _context_restrict
def __exit__(self, type, value, traceback):
def __exit__(self, _type, _value, _traceback):
_bpy.data = self.data
_bpy.context = self.context

View File

@@ -31,7 +31,7 @@ class _TempModuleOverride:
self.module = sys.modules.get(self.module_name)
sys.modules[self.module_name] = self.module_override
def __exit__(self, type, value, traceback):
def __exit__(self, _type, _value, _traceback):
if self.module is None:
# Account for removal of `module_override` (albeit unlikely).
sys.modules.pop(self.module_name, None)

View File

@@ -99,7 +99,7 @@ _node_categories = {}
def register_node_categories(identifier, cat_list):
if identifier in _node_categories:
raise KeyError("Node categories list '{:s}' already registered".format(identifier))
return
# return
# works as draw function for menus
def draw_node_item(self, context):

View File

@@ -350,7 +350,7 @@ def xml2rna(
# print(elems)
if len(elems) == 1:
# sub node named by its type
child_xml_real, = elems
child_xml_real = elems[0]
# print(child_xml_real, subvalue)
xml2rna_node(child_xml_real, subvalue)