Cleanup: resolve various pylint warnings from recent changes
This commit is contained in:
@@ -14,12 +14,6 @@ __all__ = (
|
||||
"BakeOptions",
|
||||
)
|
||||
|
||||
import bpy
|
||||
from bpy.types import (
|
||||
Context, Action, ActionSlot, ActionChannelbag,
|
||||
Object, PoseBone, KeyingSet,
|
||||
)
|
||||
|
||||
import contextlib
|
||||
from dataclasses import dataclass
|
||||
from typing import Iterable, Optional, Union, Iterator
|
||||
@@ -28,6 +22,12 @@ from collections.abc import (
|
||||
Sequence,
|
||||
)
|
||||
|
||||
import bpy
|
||||
from bpy.types import (
|
||||
Context, Action, ActionSlot, ActionChannelbag,
|
||||
Object, PoseBone, KeyingSet,
|
||||
)
|
||||
|
||||
from rna_prop_ui import (
|
||||
rna_idprop_value_to_python,
|
||||
)
|
||||
@@ -886,8 +886,7 @@ class AutoKeying:
|
||||
"Retrieve the lock status for 4D rotation."
|
||||
if bone.lock_rotations_4d:
|
||||
return [bone.lock_rotation_w, *bone.lock_rotation]
|
||||
else:
|
||||
return [all(bone.lock_rotation)] * 4
|
||||
return [all(bone.lock_rotation)] * 4
|
||||
|
||||
@classmethod
|
||||
def keyframe_channels(
|
||||
|
||||
@@ -16,7 +16,7 @@ from typing import Iterable, Optional, Any, TypeAlias
|
||||
import bpy
|
||||
from bpy.types import (
|
||||
Context, Object, Operator, PoseBone,
|
||||
Camera, ID, ActionChannelbag, PropertyGroup,
|
||||
Camera, ID, ActionChannelbag,
|
||||
)
|
||||
from mathutils import Matrix
|
||||
|
||||
@@ -784,7 +784,7 @@ def _unregister_message_bus() -> None:
|
||||
|
||||
|
||||
@bpy.app.handlers.persistent # type: ignore
|
||||
def _on_blendfile_load_post(none: Any, other_none: Any) -> None:
|
||||
def _on_blendfile_load_post(_none: Any, _other_none: Any) -> None:
|
||||
# The parameters are required, but both are None.
|
||||
_register_message_bus()
|
||||
|
||||
|
||||
@@ -124,6 +124,7 @@ class NODE_MT_compositor_node_color_mix_base(node_add_menu.NodeMenu):
|
||||
menu_path = "Color/Mix"
|
||||
|
||||
def draw(self, context):
|
||||
del context
|
||||
layout = self.layout
|
||||
|
||||
self.draw_assets_for_catalog(layout, self.menu_path)
|
||||
@@ -264,6 +265,7 @@ class NODE_MT_compositor_node_utilities_base(node_add_menu.NodeMenu):
|
||||
bl_label = "Utilities"
|
||||
|
||||
def draw(self, context):
|
||||
del context
|
||||
layout = self.layout
|
||||
self.draw_menu(layout, path="Utilities/Math")
|
||||
self.draw_menu(layout, path="Utilities/Vector")
|
||||
|
||||
@@ -517,6 +517,7 @@ class NODE_MT_gn_mesh_operations_base(node_add_menu.NodeMenu):
|
||||
menu_path = "Mesh/Operations"
|
||||
|
||||
def draw(self, context):
|
||||
del context
|
||||
layout = self.layout
|
||||
self.node_operator(layout, "GeometryNodeDualMesh")
|
||||
self.node_operator(layout, "GeometryNodeEdgePathsToCurves")
|
||||
@@ -607,6 +608,7 @@ class NODE_MT_gn_point_base(node_add_menu.NodeMenu):
|
||||
bl_label = "Point"
|
||||
|
||||
def draw(self, context):
|
||||
del context
|
||||
layout = self.layout
|
||||
self.node_operator(layout, "GeometryNodeDistributePointsInVolume")
|
||||
self.node_operator(layout, "GeometryNodeDistributePointsInGrid")
|
||||
@@ -946,6 +948,7 @@ class NODE_MT_gn_volume_operations_base(node_add_menu.NodeMenu):
|
||||
menu_path = "Volume/Operations"
|
||||
|
||||
def draw(self, context):
|
||||
del context
|
||||
layout = self.layout
|
||||
self.node_operator(layout, "GeometryNodeVolumeToMesh")
|
||||
self.node_operator(layout, "GeometryNodeGridToMesh")
|
||||
|
||||
@@ -2,15 +2,9 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
import bpy
|
||||
from bpy.types import (
|
||||
Panel,
|
||||
)
|
||||
from bpy.app.translations import (
|
||||
contexts as i18n_contexts,
|
||||
pgettext_rpt as rpt_,
|
||||
)
|
||||
from rna_prop_ui import PropertyPanel
|
||||
|
||||
|
||||
class StripModButtonsPanel:
|
||||
@@ -32,7 +26,6 @@ class STRIP_PT_modifiers(StripModButtonsPanel, Panel):
|
||||
layout.use_property_split = True
|
||||
|
||||
strip = context.active_strip
|
||||
ed = context.sequencer_scene.sequence_editor
|
||||
if strip.type == 'SOUND':
|
||||
sound = strip.sound
|
||||
else:
|
||||
|
||||
@@ -11,7 +11,6 @@ from bpy.types import (
|
||||
from bpy.app.translations import (
|
||||
contexts as i18n_contexts,
|
||||
pgettext_iface as iface_,
|
||||
pgettext_rpt as rpt_,
|
||||
)
|
||||
from bl_ui.properties_grease_pencil_common import (
|
||||
AnnotationDataPanel,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
import bpy
|
||||
from bpy.types import Menu, Panel
|
||||
from bpy.types import Panel
|
||||
from bpy.app.translations import (
|
||||
pgettext_n as n_,
|
||||
contexts as i18n_contexts,
|
||||
|
||||
Reference in New Issue
Block a user