Cleanup: unused argument, variable warnings
This commit is contained in:
@@ -726,7 +726,7 @@ class pyDiffusion2Shader(StrokeShader):
|
|||||||
self._curvatureInfo = Curvature2DAngleF0D()
|
self._curvatureInfo = Curvature2DAngleF0D()
|
||||||
|
|
||||||
def shade(self, stroke):
|
def shade(self, stroke):
|
||||||
for i in range(1, self._nbIter):
|
for _i in range(1, self._nbIter):
|
||||||
it = Interface0DIterator(stroke)
|
it = Interface0DIterator(stroke)
|
||||||
for svert in it:
|
for svert in it:
|
||||||
svert.point += self._normalInfo(it) * self._lambda * self._curvatureInfo(it)
|
svert.point += self._normalInfo(it) * self._lambda * self._curvatureInfo(it)
|
||||||
@@ -911,7 +911,7 @@ class pyBluePrintCirclesShader(StrokeShader):
|
|||||||
|
|
||||||
it = iter(stroke)
|
it = iter(stroke)
|
||||||
|
|
||||||
for j in range(self.__turns):
|
for _j in range(self.__turns):
|
||||||
prev_radius = radius
|
prev_radius = radius
|
||||||
prev_center = center
|
prev_center = center
|
||||||
radius += randint(-R, R)
|
radius += randint(-R, R)
|
||||||
@@ -952,7 +952,7 @@ class pyBluePrintEllipsesShader(StrokeShader):
|
|||||||
# for description of the line below, see pyBluePrintCirclesShader
|
# for description of the line below, see pyBluePrintCirclesShader
|
||||||
directions = phase_to_direction(sv_nb)
|
directions = phase_to_direction(sv_nb)
|
||||||
it = iter(stroke)
|
it = iter(stroke)
|
||||||
for j in range(self.__turns):
|
for _j in range(self.__turns):
|
||||||
prev_radius = radius
|
prev_radius = radius
|
||||||
prev_center = center
|
prev_center = center
|
||||||
radius = radius + Vector((randint(-R, R), randint(-R, R)))
|
radius = radius + Vector((randint(-R, R), randint(-R, R)))
|
||||||
@@ -1030,7 +1030,7 @@ class pyBluePrintSquaresShader(StrokeShader):
|
|||||||
|
|
||||||
it = iter(stroke)
|
it = iter(stroke)
|
||||||
verticesToRemove = list()
|
verticesToRemove = list()
|
||||||
for j in range(self.__turns):
|
for _j in range(self.__turns):
|
||||||
for i, svert in zip(range(num_segments), it):
|
for i, svert in zip(range(num_segments), it):
|
||||||
if i < first:
|
if i < first:
|
||||||
svert.point = points[0] + old_vecs[0] * i / (first - 1)
|
svert.point = points[0] + old_vecs[0] * i / (first - 1)
|
||||||
@@ -1125,7 +1125,7 @@ class pyBluePrintDirectedSquaresShader(StrokeShader):
|
|||||||
|
|
||||||
it = iter(stroke)
|
it = iter(stroke)
|
||||||
verticesToRemove = list()
|
verticesToRemove = list()
|
||||||
for j in range(self.__turns):
|
for _j in range(self.__turns):
|
||||||
for i, svert in zip(range(num_segments), it):
|
for i, svert in zip(range(num_segments), it):
|
||||||
if i < first:
|
if i < first:
|
||||||
svert.point = points[0] + old_vecs[0] * i / (first - 1)
|
svert.point = points[0] + old_vecs[0] * i / (first - 1)
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ def normal_at_I0D(it: Interface0DIterator) -> Vector:
|
|||||||
# this case sometimes has a small difference with Normal2DF0D (1e-3 -ish)
|
# this case sometimes has a small difference with Normal2DF0D (1e-3 -ish)
|
||||||
it.decrement()
|
it.decrement()
|
||||||
a = it.object
|
a = it.object
|
||||||
curr, b = next(it), next(it)
|
_curr, b = next(it), next(it)
|
||||||
# give iterator back in original state
|
# give iterator back in original state
|
||||||
it.decrement()
|
it.decrement()
|
||||||
return (b.point - a.point).orthogonal().normalized()
|
return (b.point - a.point).orthogonal().normalized()
|
||||||
@@ -229,8 +229,6 @@ def simplifyDouglasPeucker(points, tolerance):
|
|||||||
first_stack = []
|
first_stack = []
|
||||||
last_stack = []
|
last_stack = []
|
||||||
|
|
||||||
new_points = []
|
|
||||||
|
|
||||||
markers[first] = 1
|
markers[first] = 1
|
||||||
markers[last] = 1
|
markers[last] = 1
|
||||||
|
|
||||||
|
|||||||
@@ -1028,7 +1028,7 @@ class DashedLineShader(StrokeShader):
|
|||||||
it = stroke.stroke_vertices_begin(sampling)
|
it = stroke.stroke_vertices_begin(sampling)
|
||||||
pattern_cycle = cycle(self.pattern)
|
pattern_cycle = cycle(self.pattern)
|
||||||
pattern = next(pattern_cycle)
|
pattern = next(pattern_cycle)
|
||||||
for svert in it:
|
for _svert in it:
|
||||||
pos = it.t # curvilinear abscissa
|
pos = it.t # curvilinear abscissa
|
||||||
|
|
||||||
if pos - start + sampling > pattern:
|
if pos - start + sampling > pattern:
|
||||||
|
|||||||
@@ -3013,7 +3013,7 @@ def km_sequencerpreview(params):
|
|||||||
return keymap
|
return keymap
|
||||||
|
|
||||||
|
|
||||||
def km_sequencer_channels(params):
|
def km_sequencer_channels(_params):
|
||||||
items = []
|
items = []
|
||||||
keymap = (
|
keymap = (
|
||||||
"Sequencer Channels",
|
"Sequencer Channels",
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class NodeAddOperator:
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def description(cls, context, properties):
|
def description(cls, _context, properties):
|
||||||
nodetype = properties["type"]
|
nodetype = properties["type"]
|
||||||
bl_rna = bpy.types.Node.bl_rna_get_subclass(nodetype)
|
bl_rna = bpy.types.Node.bl_rna_get_subclass(nodetype)
|
||||||
if bl_rna is not None:
|
if bl_rna is not None:
|
||||||
|
|||||||
@@ -77,12 +77,12 @@ class CURVES_MT_add_attribute(Menu):
|
|||||||
|
|
||||||
|
|
||||||
class CURVES_UL_attributes(UIList):
|
class CURVES_UL_attributes(UIList):
|
||||||
def filter_items(self, context, data, property):
|
def filter_items(self, _context, data, property):
|
||||||
attributes = getattr(data, property)
|
attributes = getattr(data, property)
|
||||||
flags = []
|
flags = []
|
||||||
indices = [i for i in range(len(attributes))]
|
indices = [i for i in range(len(attributes))]
|
||||||
|
|
||||||
for index, item in enumerate(attributes):
|
for item in attributes:
|
||||||
flags.append(self.bitflag_filter_item if item.is_internal else 0)
|
flags.append(self.bitflag_filter_item if item.is_internal else 0)
|
||||||
|
|
||||||
return flags, indices
|
return flags, indices
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class MESH_MT_color_attribute_context_menu(Menu):
|
|||||||
def draw(self, _context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
props = layout.operator(
|
layout.operator(
|
||||||
"geometry.color_attribute_duplicate",
|
"geometry.color_attribute_duplicate",
|
||||||
icon='DUPLICATE',
|
icon='DUPLICATE',
|
||||||
)
|
)
|
||||||
@@ -507,12 +507,12 @@ class MESH_UL_attributes(UIList):
|
|||||||
'CORNER': "Face Corner",
|
'CORNER': "Face Corner",
|
||||||
}
|
}
|
||||||
|
|
||||||
def filter_items(self, context, data, property):
|
def filter_items(self, _context, data, property):
|
||||||
attributes = getattr(data, property)
|
attributes = getattr(data, property)
|
||||||
flags = []
|
flags = []
|
||||||
indices = [i for i in range(len(attributes))]
|
indices = [i for i in range(len(attributes))]
|
||||||
|
|
||||||
for index, item in enumerate(attributes):
|
for item in attributes:
|
||||||
flags.append(self.bitflag_filter_item if item.is_internal else 0)
|
flags.append(self.bitflag_filter_item if item.is_internal else 0)
|
||||||
|
|
||||||
return flags, indices
|
return flags, indices
|
||||||
@@ -596,7 +596,7 @@ class ColorAttributesListBase():
|
|||||||
'CORNER': "Face Corner",
|
'CORNER': "Face Corner",
|
||||||
}
|
}
|
||||||
|
|
||||||
def filter_items(self, context, data, property):
|
def filter_items(self, _context, data, property):
|
||||||
attrs = getattr(data, property)
|
attrs = getattr(data, property)
|
||||||
ret = []
|
ret = []
|
||||||
idxs = []
|
idxs = []
|
||||||
|
|||||||
@@ -65,12 +65,12 @@ class POINTCLOUD_MT_add_attribute(Menu):
|
|||||||
|
|
||||||
|
|
||||||
class POINTCLOUD_UL_attributes(UIList):
|
class POINTCLOUD_UL_attributes(UIList):
|
||||||
def filter_items(self, context, data, property):
|
def filter_items(self, _context, data, property):
|
||||||
attributes = getattr(data, property)
|
attributes = getattr(data, property)
|
||||||
flags = []
|
flags = []
|
||||||
indices = [i for i in range(len(attributes))]
|
indices = [i for i in range(len(attributes))]
|
||||||
|
|
||||||
for index, item in enumerate(attributes):
|
for item in attributes:
|
||||||
flags.append(self.bitflag_filter_item if item.is_internal else 0)
|
flags.append(self.bitflag_filter_item if item.is_internal else 0)
|
||||||
|
|
||||||
return flags, indices
|
return flags, indices
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ class NLA_MT_marker(Menu):
|
|||||||
class NLA_MT_marker_select(Menu):
|
class NLA_MT_marker_select(Menu):
|
||||||
bl_label = 'Select'
|
bl_label = 'Select'
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, _context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
layout.operator("marker.select_all", text="All").action = 'SELECT'
|
layout.operator("marker.select_all", text="All").action = 'SELECT'
|
||||||
|
|||||||
Reference in New Issue
Block a user