diff --git a/doc/manpage/blender.1.py b/doc/manpage/blender.1.py index 49dae35e0c5..739151b83fa 100755 --- a/doc/manpage/blender.1.py +++ b/doc/manpage/blender.1.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0-or-later -''' +""" This script generates the blender.1 man page, embedding the help text from the Blender executable itself. Invoke it as follows: @@ -9,7 +9,7 @@ from the Blender executable itself. Invoke it as follows: where is the path to the Blender executable, and is where to write the generated man page. -''' +""" import argparse import os @@ -87,29 +87,29 @@ def man_page_from_blender_help(fh: TextIO, blender_bin: str, verbose: bool) -> N (blender_info["date"], blender_info["version"].replace(".", "\\&.")) ) - fh.write(r''' + fh.write(r""" .SH NAME -blender \- a full-featured 3D application''') +blender \- a full-featured 3D application""") - fh.write(r''' + fh.write(r""" .SH SYNOPSIS -.B blender [args ...] [file] [args ...]''') +.B blender [args ...] [file] [args ...]""") - fh.write(r''' + fh.write(r""" .br .SH DESCRIPTION .PP .B blender -is a full-featured 3D application. It supports the entirety of the 3D pipeline - ''' - '''modeling, rigging, animation, simulation, rendering, compositing, motion tracking, and video editing. +is a full-featured 3D application. It supports the entirety of the 3D pipeline - """ + """modeling, rigging, animation, simulation, rendering, compositing, motion tracking, and video editing. -Use Blender to create 3D images and animations, films and commercials, content for games, ''' - r'''architectural and industrial visualizations, and scientific visualizations. +Use Blender to create 3D images and animations, films and commercials, content for games, """ + r"""architectural and industrial visualizations, and scientific visualizations. -https://www.blender.org''') +https://www.blender.org""") - fh.write(r''' -.SH OPTIONS''') + fh.write(r""" +.SH OPTIONS""") fh.write("\n\n") @@ -152,7 +152,7 @@ https://www.blender.org''') # Footer Content. - fh.write(r''' + fh.write(r""" .br .SH SEE ALSO .B luxrender(1) @@ -162,7 +162,7 @@ https://www.blender.org''') This manpage was written for a Debian GNU/Linux system by Daniel Mester and updated by Cyril Brulebois and Dan Eicher . -''') +""") def create_argparse() -> argparse.ArgumentParser: diff --git a/scripts/modules/bl_app_template_utils.py b/scripts/modules/bl_app_template_utils.py index 985dbc22be6..4d1b646ae3f 100644 --- a/scripts/modules/bl_app_template_utils.py +++ b/scripts/modules/bl_app_template_utils.py @@ -149,7 +149,7 @@ def activate(*, template_id=None, reload_scripts=False): template_id_prev = _app_template["id"] # not needed but may as well avoids redundant - # disable/enable for all add-ons on 'File -> New' + # disable/enable for all add-ons on "File -> New". if not reload_scripts and template_id_prev == template_id: return diff --git a/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py b/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py index b1b751c96ab..f917986f9c6 100644 --- a/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py +++ b/scripts/modules/bl_console_utils/autocomplete/complete_namespace.py @@ -16,12 +16,12 @@ TEMP_N = len(TEMP) def is_dict(obj): """Returns whether obj is a dictionary""" - return hasattr(obj, 'keys') and hasattr(getattr(obj, 'keys'), '__call__') + return hasattr(obj, "keys") and hasattr(getattr(obj, "keys"), "__call__") def is_struct_seq(obj): """Returns whether obj is a structured sequence subclass: sys.float_info""" - return isinstance(obj, tuple) and hasattr(obj, 'n_fields') + return isinstance(obj, tuple) and hasattr(obj, "n_fields") def complete_names(word, namespace): diff --git a/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/scripts/modules/bl_i18n_utils/bl_extract_messages.py index c5c5cb007ab..a8db5508880 100644 --- a/scripts/modules/bl_i18n_utils/bl_extract_messages.py +++ b/scripts/modules/bl_i18n_utils/bl_extract_messages.py @@ -340,7 +340,7 @@ def dump_rna_messages(msgs, reports, settings, verbose=False): msgctxt = bl_rna.translation_context or default_context if bl_rna.name and (bl_rna.name != bl_rna.identifier or - (msgctxt != default_context and not hasattr(bl_rna, 'bl_label'))): + (msgctxt != default_context and not hasattr(bl_rna, "bl_label"))): process_msg(msgs, msgctxt, bl_rna.name, msgsrc, reports, check_ctxt_rna, settings) if bl_rna.description: @@ -349,14 +349,14 @@ def dump_rna_messages(msgs, reports, settings, verbose=False): process_msg(msgs, default_context, cls.__doc__, msgsrc, reports, check_ctxt_rna_tip, settings) # Panels' "tabs" system. - if hasattr(bl_rna, 'bl_category') and bl_rna.bl_category: + if hasattr(bl_rna, "bl_category") and bl_rna.bl_category: process_msg(msgs, default_context, bl_rna.bl_category, msgsrc, reports, check_ctxt_rna, settings) - if hasattr(bl_rna, 'bl_label') and bl_rna.bl_label: + if hasattr(bl_rna, "bl_label") and bl_rna.bl_label: process_msg(msgs, msgctxt, bl_rna.bl_label, msgsrc, reports, check_ctxt_rna, settings) # Tools Panels definitions. - if hasattr(bl_rna, 'tools_all') and bl_rna.tools_all: + if hasattr(bl_rna, "tools_all") and bl_rna.tools_all: walk_tools_definitions(cls) walk_properties(cls) @@ -472,7 +472,7 @@ def dump_rna_messages(msgs, reports, settings, verbose=False): ##### Python source code ##### def dump_py_messages_from_files(msgs, reports, files, settings): """ - Dump text inlined in the python files given, e.g. 'My Name' in: + Dump text inlined in the python files given, e.g. "My Name" in: layout.prop("someprop", text="My Name") """ import ast diff --git a/scripts/modules/bl_i18n_utils/utils.py b/scripts/modules/bl_i18n_utils/utils.py index f29b108123d..4beca41d788 100644 --- a/scripts/modules/bl_i18n_utils/utils.py +++ b/scripts/modules/bl_i18n_utils/utils.py @@ -473,7 +473,7 @@ class I18nMessages: @staticmethod def _new_messages(): - return getattr(collections, 'OrderedDict', dict)() + return getattr(collections, "OrderedDict", dict)() @classmethod def gen_empty_messages(cls, uid, blender_ver, blender_hash, time, year, default_copyright=True, settings=settings): diff --git a/scripts/modules/bl_i18n_utils/utils_cli.py b/scripts/modules/bl_i18n_utils/utils_cli.py index 253966205d3..fb17c40dfd3 100644 --- a/scripts/modules/bl_i18n_utils/utils_cli.py +++ b/scripts/modules/bl_i18n_utils/utils_cli.py @@ -131,7 +131,7 @@ def main(): settings = settings_i18n.I18nSettings() settings.load(args.settings) - if getattr(args, 'template', None) is not None: + if getattr(args, "template", None) is not None: settings.FILE_NAME_POT = args.template args.func(args=args, settings=settings) diff --git a/scripts/modules/bl_keymap_utils/versioning.py b/scripts/modules/bl_keymap_utils/versioning.py index 0b1ae56a90d..3af81067b7a 100644 --- a/scripts/modules/bl_keymap_utils/versioning.py +++ b/scripts/modules/bl_keymap_utils/versioning.py @@ -24,7 +24,7 @@ def keyconfig_update(keyconfig_data, keyconfig_version): for _km_name, _km_parms, km_items_data in keyconfig_data: for (_item_op, item_event, _item_prop) in km_items_data["items"]: if item_event.get("value") == 'PRESS': - # Unfortunately we don't know the 'map_type' at this point. + # Unfortunately we don't know the `map_type` at this point. # Setting repeat true on other kinds of events is harmless. item_event["repeat"] = True diff --git a/scripts/modules/bl_previews_utils/bl_previews_render.py b/scripts/modules/bl_previews_utils/bl_previews_render.py index 7f3d62e5687..0b975fe90ee 100644 --- a/scripts/modules/bl_previews_utils/bl_previews_render.py +++ b/scripts/modules/bl_previews_utils/bl_previews_render.py @@ -68,7 +68,7 @@ def do_previews(do_objects, do_collections, do_scenes, do_data_intern): if engine == '__SCENE': backup_scene, backup_world, backup_camera, backup_light, backup_camera_data, backup_light_data = [()] * 6 scene = bpy.context.window.scene - exclude_props = {('world',), ('camera',), ('tool_settings',), ('preview',)} + exclude_props = {("world",), ("camera",), ("tool_settings",), ("preview",)} backup_scene = tuple(rna_backup_gen(scene, exclude_props=exclude_props)) world = scene.world camera = scene.camera @@ -343,7 +343,7 @@ def do_previews(do_objects, do_collections, do_scenes, do_data_intern): ob.hide_render = False bpy.context.view_layer.update() - preview_render_do(render_context, 'objects', root.name, objects) + preview_render_do(render_context, "objects", root.name, objects) # XXX Hyper Super Uber Suspicious Hack! # Without this, on windows build, script excepts with following message: @@ -390,7 +390,7 @@ def do_previews(do_objects, do_collections, do_scenes, do_data_intern): offset_matrix = Matrix.Translation(grp.instance_offset).inverted() - preview_render_do(render_context, 'collections', grp.name, objects, offset_matrix) + preview_render_do(render_context, "collections", grp.name, objects, offset_matrix) scene = bpy.data.scenes[render_context.scene, None] scene.collection.objects.unlink(bpy.data.objects[grp_obname, None]) @@ -413,7 +413,7 @@ def do_previews(do_objects, do_collections, do_scenes, do_data_intern): objects = tuple((ob.name, ob.library.filepath if ob.library else None) for ob in scene.objects if (not ob.hide_render) and (ob.type in OBJECT_TYPES_RENDER)) - preview_render_do(render_context, 'scenes', scene.name, objects) + preview_render_do(render_context, "scenes", scene.name, objects) if not render_context_delete(render_context): do_save = False diff --git a/scripts/modules/bpy/utils/__init__.py b/scripts/modules/bpy/utils/__init__.py index e76559c07a0..4cbad7b36d2 100644 --- a/scripts/modules/bpy/utils/__init__.py +++ b/scripts/modules/bpy/utils/__init__.py @@ -292,7 +292,7 @@ def load_scripts(*, reload_scripts=False, refresh_scripts=False): if _os.path.isdir(path): _sys_path_ensure_prepend(path) - # Only add to 'sys.modules' unless this is 'startup'. + # Only add to `sys.modules` unless this is 'startup'. if path_subdir == "startup": for mod in modules_from_path(path, loaded_modules): test_register(mod) diff --git a/scripts/modules/bpy_extras/io_utils.py b/scripts/modules/bpy_extras/io_utils.py index 794c39e07dc..88e172ef5b6 100644 --- a/scripts/modules/bpy_extras/io_utils.py +++ b/scripts/modules/bpy_extras/io_utils.py @@ -122,7 +122,7 @@ def orientation_helper(axis_forward='Y', axis_up='Z'): 'XYZ'[('XYZ'.index(self.axis_up[-1]) + 1) % 3] ) - cls.__annotations__['axis_forward'] = EnumProperty( + cls.__annotations__["axis_forward"] = EnumProperty( name="Forward", items=( ('X', "X Forward", ""), @@ -143,7 +143,7 @@ def orientation_helper(axis_forward='Y', axis_up='Z'): 'XYZ'[('XYZ'.index(self.axis_forward[-1]) + 1) % 3] ) - cls.__annotations__['axis_up'] = EnumProperty( + cls.__annotations__["axis_up"] = EnumProperty( name="Up", items=( ('X', "X Up", ""), diff --git a/scripts/modules/bpy_extras/node_shader_utils.py b/scripts/modules/bpy_extras/node_shader_utils.py index c5b1b1d4499..197dd02cae9 100644 --- a/scripts/modules/bpy_extras/node_shader_utils.py +++ b/scripts/modules/bpy_extras/node_shader_utils.py @@ -372,7 +372,7 @@ class PrincipledBSDFWrapper(ShaderWrapper): self, self.node_principled_bsdf, self.node_principled_bsdf.inputs["Metallic"], grid_row_diff=0, - colorspace_name='Non-Color', + colorspace_name="Non-Color", ) metallic_texture = property(metallic_texture_get) @@ -784,32 +784,32 @@ class ShaderImageTextureWrapper(): def translation_get(self): if self.node_mapping is None: return Vector((0.0, 0.0, 0.0)) - return self.node_mapping.inputs['Location'].default_value + return self.node_mapping.inputs["Location"].default_value @_set_check def translation_set(self, translation): - self.node_mapping.inputs['Location'].default_value = translation + self.node_mapping.inputs["Location"].default_value = translation translation = property(translation_get, translation_set) def rotation_get(self): if self.node_mapping is None: return Vector((0.0, 0.0, 0.0)) - return self.node_mapping.inputs['Rotation'].default_value + return self.node_mapping.inputs["Rotation"].default_value @_set_check def rotation_set(self, rotation): - self.node_mapping.inputs['Rotation'].default_value = rotation + self.node_mapping.inputs["Rotation"].default_value = rotation rotation = property(rotation_get, rotation_set) def scale_get(self): if self.node_mapping is None: return Vector((1.0, 1.0, 1.0)) - return self.node_mapping.inputs['Scale'].default_value + return self.node_mapping.inputs["Scale"].default_value @_set_check def scale_set(self, scale): - self.node_mapping.inputs['Scale'].default_value = scale + self.node_mapping.inputs["Scale"].default_value = scale scale = property(scale_get, scale_set) diff --git a/scripts/modules/bpy_extras/wm_utils/progress_report.py b/scripts/modules/bpy_extras/wm_utils/progress_report.py index 371d598042c..6dddb67debd 100644 --- a/scripts/modules/bpy_extras/wm_utils/progress_report.py +++ b/scripts/modules/bpy_extras/wm_utils/progress_report.py @@ -26,10 +26,10 @@ class ProgressReport: progress.leave_substeps() # No need to step here, this implicitly does it. progress.leave_substeps("Finished!") # You may pass some message too. """ - __slots__ = ('wm', 'running', 'steps', 'curr_step', 'start_time') + __slots__ = ("wm", "running", "steps", "curr_step", "start_time") def __init__(self, wm=None): - self_wm = getattr(self, 'wm', None) + self_wm = getattr(self, "wm", None) if self_wm: self.finalize() self.running = False @@ -117,11 +117,11 @@ class ProgressReportSubstep: for j in range(100): subprogress2.step() """ - __slots__ = ('progress', 'nbr', 'msg', 'final_msg', 'level') + __slots__ = ("progress", "nbr", "msg", "final_msg", "level") def __init__(self, progress, nbr, msg="", final_msg=""): # Allows to generate a subprogress context handler from another one. - progress = getattr(progress, 'progress', progress) + progress = getattr(progress, "progress", progress) self.progress = progress self.nbr = nbr diff --git a/scripts/modules/bpy_types.py b/scripts/modules/bpy_types.py index 62228482ed2..ca62145dc87 100644 --- a/scripts/modules/bpy_types.py +++ b/scripts/modules/bpy_types.py @@ -440,7 +440,7 @@ class _GenericBone: def _other_bones(self): id_data = self.id_data - # `id_data` is an 'Object' for `PosePone`, otherwise it's an `Armature`. + # `id_data` is an `Object` for `PosePone`, otherwise it's an `Armature`. if isinstance(self, PoseBone): return id_data.pose.bones if isinstance(self, EditBone): @@ -688,7 +688,7 @@ class RNAMetaPropGroup(StructMetaPropGroup, RNAMeta): pass -# Same as 'Operator' +# Same as `Operator`. # only without 'as_keywords' class Gizmo(StructRNA): __slots__ = () diff --git a/scripts/modules/graphviz_export.py b/scripts/modules/graphviz_export.py index 007f2e018a7..1af9fcb4f5e 100644 --- a/scripts/modules/graphviz_export.py +++ b/scripts/modules/graphviz_export.py @@ -91,7 +91,7 @@ def graph_armature(obj, filepath, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=Tr parent_name = parent.name connected = bone.use_connect elif FAKE_PARENT: - parent_name = 'Object::%s' % obj.name + parent_name = "Object::%s" % obj.name connected = False else: continue diff --git a/scripts/modules/keyingsets_utils.py b/scripts/modules/keyingsets_utils.py index b566889bfb9..75e685a0a5a 100644 --- a/scripts/modules/keyingsets_utils.py +++ b/scripts/modules/keyingsets_utils.py @@ -93,7 +93,7 @@ def RKS_ITER_selected_bones(ksi, context, ks): # Generate Callbacks -# 'Available' F-Curves +# "Available" F-Curves. def RKS_GEN_available(_ksi, _context, ks, data): # try to get the animation data associated with the closest # ID-block to the data (neither of which may exist/be easy to find) diff --git a/scripts/modules/rna_info.py b/scripts/modules/rna_info.py index aa3e9945f9e..8084fb1740a 100644 --- a/scripts/modules/rna_info.py +++ b/scripts/modules/rna_info.py @@ -735,7 +735,7 @@ def BuildRNAInfo(): i += 1 if not ok: - print('Dependancy "%s" could not be found for "%s"' % (identifier, rna_base)) + print("Dependency \"%s\" could not be found for \"%s\"" % (identifier, rna_base)) break diff --git a/scripts/startup/bl_operators/freestyle.py b/scripts/startup/bl_operators/freestyle.py index 70ec1024f17..caed278d8fc 100644 --- a/scripts/startup/bl_operators/freestyle.py +++ b/scripts/startup/bl_operators/freestyle.py @@ -121,7 +121,7 @@ class SCENE_OT_freestyle_fill_range_by_selection(Operator): class SCENE_OT_freestyle_add_edge_marks_to_keying_set(Operator): - '''Add the data paths to the Freestyle Edge Mark property of selected edges to the active keying set''' + """Add the data paths to the Freestyle Edge Mark property of selected edges to the active keying set""" bl_idname = "scene.freestyle_add_edge_marks_to_keying_set" bl_label = "Add Edge Marks to Keying Set" bl_options = {'UNDO'} @@ -152,7 +152,7 @@ class SCENE_OT_freestyle_add_edge_marks_to_keying_set(Operator): class SCENE_OT_freestyle_add_face_marks_to_keying_set(Operator): - '''Add the data paths to the Freestyle Face Mark property of selected polygons to the active keying set''' + """Add the data paths to the Freestyle Face Mark property of selected polygons to the active keying set""" bl_idname = "scene.freestyle_add_face_marks_to_keying_set" bl_label = "Add Face Marks to Keying Set" bl_options = {'UNDO'} diff --git a/scripts/startup/bl_operators/node.py b/scripts/startup/bl_operators/node.py index 8100fae3970..c57f482146f 100644 --- a/scripts/startup/bl_operators/node.py +++ b/scripts/startup/bl_operators/node.py @@ -24,7 +24,7 @@ class NodeSetting(PropertyGroup): ) -# Base class for node 'Add' operators +# Base class for node "Add" operators. class NodeAddOperator: type: StringProperty( @@ -141,14 +141,14 @@ class NodeAddOperator: # Simple basic operator for adding a node class NODE_OT_add_node(NodeAddOperator, Operator): - '''Add a node to the active tree''' + """Add a node to the active tree""" bl_idname = "node.add_node" bl_label = "Add Node" bl_options = {'REGISTER', 'UNDO'} class NODE_OT_collapse_hide_unused_toggle(Operator): - '''Toggle collapsed nodes and hide unused sockets''' + """Toggle collapsed nodes and hide unused sockets""" bl_idname = "node.collapse_hide_unused_toggle" bl_label = "Collapse and Hide Unused Sockets" bl_options = {'REGISTER', 'UNDO'} @@ -179,7 +179,7 @@ class NODE_OT_collapse_hide_unused_toggle(Operator): class NODE_OT_tree_path_parent(Operator): - '''Go to parent node tree''' + """Go to parent node tree""" bl_idname = "node.tree_path_parent" bl_label = "Parent Node Tree" bl_options = {'REGISTER', 'UNDO'} diff --git a/scripts/startup/bl_operators/object_quick_effects.py b/scripts/startup/bl_operators/object_quick_effects.py index e676999df9f..40f6170fa02 100644 --- a/scripts/startup/bl_operators/object_quick_effects.py +++ b/scripts/startup/bl_operators/object_quick_effects.py @@ -317,7 +317,7 @@ class QuickExplode(ObjectModeOperator, Operator): node_out_mat = node break - node_surface = node_out_mat.inputs['Surface'].links[0].from_node + node_surface = node_out_mat.inputs["Surface"].links[0].from_node node_x = node_surface.location[0] node_y = node_surface.location[1] - 400 @@ -326,7 +326,7 @@ class QuickExplode(ObjectModeOperator, Operator): node_mix = nodes.new('ShaderNodeMixShader') node_mix.location = (node_x - offset_x, node_y) mat.node_tree.links.new(node_surface.outputs[0], node_mix.inputs[1]) - mat.node_tree.links.new(node_mix.outputs["Shader"], node_out_mat.inputs['Surface']) + mat.node_tree.links.new(node_mix.outputs["Shader"], node_out_mat.inputs["Surface"]) offset_x += 200 node_trans = nodes.new('ShaderNodeBsdfTransparent') diff --git a/scripts/startup/bl_operators/presets.py b/scripts/startup/bl_operators/presets.py index 83ee0769381..96a20e8d078 100644 --- a/scripts/startup/bl_operators/presets.py +++ b/scripts/startup/bl_operators/presets.py @@ -96,7 +96,7 @@ class AddPresetBase: # Reset preset name wm = bpy.data.window_managers[0] if name == wm.preset_name: - wm.preset_name = data_('New Preset') + wm.preset_name = data_("New Preset") filename = self.as_filename(name) diff --git a/scripts/startup/bl_operators/rigidbody.py b/scripts/startup/bl_operators/rigidbody.py index fffd010b768..f60288c1b6a 100644 --- a/scripts/startup/bl_operators/rigidbody.py +++ b/scripts/startup/bl_operators/rigidbody.py @@ -9,7 +9,7 @@ from bpy.props import ( class CopyRigidbodySettings(Operator): - '''Copy Rigid Body settings from active object to selected''' + """Copy Rigid Body settings from active object to selected""" bl_idname = "rigidbody.object_settings_copy" bl_label = "Copy Rigid Body Settings" bl_options = {'REGISTER', 'UNDO'} @@ -74,7 +74,7 @@ class CopyRigidbodySettings(Operator): class BakeToKeyframes(Operator): - '''Bake rigid body transformations of selected objects to keyframes''' + """Bake rigid body transformations of selected objects to keyframes""" bl_idname = "rigidbody.bake_to_keyframes" bl_label = "Bake to Keyframes" bl_options = {'REGISTER', 'UNDO'} @@ -198,7 +198,7 @@ class BakeToKeyframes(Operator): class ConnectRigidBodies(Operator): - '''Create rigid body constraints between selected rigid bodies''' + """Create rigid body constraints between selected rigid bodies""" bl_idname = "rigidbody.connect" bl_label = "Connect Rigid Bodies" bl_options = {'REGISTER', 'UNDO'} diff --git a/scripts/startup/bl_operators/sequencer.py b/scripts/startup/bl_operators/sequencer.py index 45a526272d6..4c1f7fae863 100644 --- a/scripts/startup/bl_operators/sequencer.py +++ b/scripts/startup/bl_operators/sequencer.py @@ -166,20 +166,22 @@ class SequencerFadesAdd(Operator): name="Fade Duration", description="Duration of the fade in seconds", default=1.0, - min=0.01) + min=0.01, + ) type: EnumProperty( items=( - ('IN_OUT', 'Fade In and Out', 'Fade selected strips in and out'), - ('IN', 'Fade In', 'Fade in selected strips'), - ('OUT', 'Fade Out', 'Fade out selected strips'), - ('CURSOR_FROM', 'From Current Frame', - 'Fade from the time cursor to the end of overlapping sequences'), - ('CURSOR_TO', 'To Current Frame', - 'Fade from the start of sequences under the time cursor to the current frame'), + ('IN_OUT', "Fade In and Out", "Fade selected strips in and out"), + ('IN', "Fade In", "Fade in selected strips"), + ('OUT', "Fade Out", "Fade out selected strips"), + ('CURSOR_FROM', "From Current Frame", + "Fade from the time cursor to the end of overlapping sequences"), + ('CURSOR_TO', "To Current Frame", + "Fade from the start of sequences under the time cursor to the current frame"), ), name="Fade Type", description="Fade in, out, both in and out, to, or from the current frame. Default is both in and out", - default='IN_OUT') + default='IN_OUT', + ) @classmethod def poll(cls, context): diff --git a/scripts/startup/bl_operators/spreadsheet.py b/scripts/startup/bl_operators/spreadsheet.py index aef4231d573..0156dbc4d26 100644 --- a/scripts/startup/bl_operators/spreadsheet.py +++ b/scripts/startup/bl_operators/spreadsheet.py @@ -6,7 +6,7 @@ from bpy.types import Operator class SPREADSHEET_OT_toggle_pin(Operator): - '''Turn on or off pinning''' + """Turn on or off pinning""" bl_idname = "spreadsheet.toggle_pin" bl_label = "Toggle Pin" bl_options = {'REGISTER'} diff --git a/scripts/startup/bl_operators/vertexpaint_dirt.py b/scripts/startup/bl_operators/vertexpaint_dirt.py index 0b948fa2763..08f2e1461b8 100644 --- a/scripts/startup/bl_operators/vertexpaint_dirt.py +++ b/scripts/startup/bl_operators/vertexpaint_dirt.py @@ -129,7 +129,7 @@ from math import pi class VertexPaintDirt(Operator): - '''Generate a dirt map gradient based on cavity''' + """Generate a dirt map gradient based on cavity""" bl_idname = "paint.vertex_color_dirt" bl_label = "Dirty Vertex Colors" bl_options = {'REGISTER', 'UNDO'} diff --git a/scripts/startup/bl_ui/properties_object.py b/scripts/startup/bl_ui/properties_object.py index 3977782050f..30fd28ba727 100644 --- a/scripts/startup/bl_ui/properties_object.py +++ b/scripts/startup/bl_ui/properties_object.py @@ -243,7 +243,7 @@ class OBJECT_PT_instancing(ObjectButtonsPanel, Panel): @classmethod def poll(cls, context): ob = context.object - # FONT objects need (vertex) instancing for the 'Object Font' feature + # FONT objects need (vertex) instancing for the "Object Font" feature. return (ob.type in {'MESH', 'EMPTY', 'FONT'}) def draw(self, context): diff --git a/scripts/startup/bl_ui/properties_world.py b/scripts/startup/bl_ui/properties_world.py index 1fc25ec6101..8c26b909f9d 100644 --- a/scripts/startup/bl_ui/properties_world.py +++ b/scripts/startup/bl_ui/properties_world.py @@ -103,7 +103,7 @@ class EEVEE_WORLD_PT_surface(WorldButtonsPanel, Panel): node = ntree.get_output_node('EEVEE') if node: - input = find_node_input(node, 'Surface') + input = find_node_input(node, "Surface") if input: layout.template_node_view(ntree, node, input) else: @@ -136,7 +136,7 @@ class EEVEE_WORLD_PT_volume(WorldButtonsPanel, Panel): layout.use_property_split = True if node: - input = find_node_input(node, 'Volume') + input = find_node_input(node, "Volume") if input: layout.template_node_view(ntree, node, input) else: diff --git a/scripts/startup/bl_ui/space_clip.py b/scripts/startup/bl_ui/space_clip.py index 01212d34914..c77cbb10012 100644 --- a/scripts/startup/bl_ui/space_clip.py +++ b/scripts/startup/bl_ui/space_clip.py @@ -752,7 +752,7 @@ class CLIP_PT_track(CLIP_PT_tracking_panel, Panel): row = layout.row(align=True) row.prop(act_track, "use_custom_color", text="") - CLIP_PT_track_color_presets.draw_menu(row, iface_('Custom Color Presets')) + CLIP_PT_track_color_presets.draw_menu(row, iface_("Custom Color Presets")) row.operator("clip.track_copy_color", icon='COPY_ID', text="") if act_track.use_custom_color: diff --git a/scripts/startup/bl_ui/space_nla.py b/scripts/startup/bl_ui/space_nla.py index b43434d9988..070011ba5ca 100644 --- a/scripts/startup/bl_ui/space_nla.py +++ b/scripts/startup/bl_ui/space_nla.py @@ -150,7 +150,7 @@ class NLA_MT_marker(Menu): class NLA_MT_marker_select(Menu): - bl_label = 'Select' + bl_label = "Select" def draw(self, _context): layout = self.layout diff --git a/scripts/startup/bl_ui/space_sequencer.py b/scripts/startup/bl_ui/space_sequencer.py index b6bb796e3d1..dd88c2b128b 100644 --- a/scripts/startup/bl_ui/space_sequencer.py +++ b/scripts/startup/bl_ui/space_sequencer.py @@ -1769,7 +1769,7 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel): layout.prop(strip, "use_annotations", text="Annotations") if scene: # Warning, this is not a good convention to follow. - # Expose here because setting the alpha from the 'Render' menu is very inconvenient. + # Expose here because setting the alpha from the "Render" menu is very inconvenient. layout.prop(scene.render, "film_transparent") diff --git a/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 6ea767433ea..e341f39261a 100644 --- a/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -2620,7 +2620,7 @@ class IMAGE_PT_tools_active(ToolSelectPanelHelper, Panel): bl_label = "Tools" # not visible bl_options = {'HIDE_HEADER'} - # Satisfy the 'ToolSelectPanelHelper' API. + # Satisfy the `ToolSelectPanelHelper` API. keymap_prefix = "Image Editor Tool:" # Default group to use as a fallback. @@ -2715,7 +2715,7 @@ class NODE_PT_tools_active(ToolSelectPanelHelper, Panel): bl_label = "Tools" # not visible bl_options = {'HIDE_HEADER'} - # Satisfy the 'ToolSelectPanelHelper' API. + # Satisfy the `ToolSelectPanelHelper` API. keymap_prefix = "Node Editor Tool:" # Default group to use as a fallback. @@ -2779,7 +2779,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): bl_label = "Tools" # not visible bl_options = {'HIDE_HEADER'} - # Satisfy the 'ToolSelectPanelHelper' API. + # Satisfy the `ToolSelectPanelHelper` API. keymap_prefix = "3D View Tool:" # Default group to use as a fallback. @@ -3147,7 +3147,7 @@ class SEQUENCER_PT_tools_active(ToolSelectPanelHelper, Panel): bl_label = "Tools" # not visible bl_options = {'HIDE_HEADER'} - # Satisfy the 'ToolSelectPanelHelper' API. + # Satisfy the `ToolSelectPanelHelper` API. keymap_prefix = "Sequence Editor Tool:" # Default group to use as a fallback. diff --git a/scripts/templates_py/custom_nodes.py b/scripts/templates_py/custom_nodes.py index 26904d9e2dc..73b38bcb27f 100644 --- a/scripts/templates_py/custom_nodes.py +++ b/scripts/templates_py/custom_nodes.py @@ -19,7 +19,7 @@ class MyCustomTree(NodeTree): # Custom socket type class MyCustomSocket(NodeSocket): # Description string - '''Custom node socket type''' + """Custom node socket type""" # Optional identifier string. If not explicitly defined, the python class name is used. bl_idname = 'CustomSocketType' # Label for nice name display diff --git a/scripts/templates_py/driver_functions.py b/scripts/templates_py/driver_functions.py index d3aab75e7ba..41990b50fd4 100644 --- a/scripts/templates_py/driver_functions.py +++ b/scripts/templates_py/driver_functions.py @@ -1,7 +1,7 @@ # This script defines functions to be used directly in driver expressions to # extend the built-in set of python functions. # -# This can be executed on manually or set to 'Register' to +# This can be executed on manually or set to "Register" to # initialize the functions on file load. diff --git a/scripts/templates_py/ui_list_generic.py b/scripts/templates_py/ui_list_generic.py index ec6135a62ac..d33075ddd65 100644 --- a/scripts/templates_py/ui_list_generic.py +++ b/scripts/templates_py/ui_list_generic.py @@ -11,7 +11,7 @@ class MyPanel(bpy.types.Panel): bl_idname = "SCENE_PT_list_demo" bl_space_type = 'VIEW_3D' bl_region_type = 'UI' - bl_category = 'My Category' + bl_category = "My Category" def draw(self, context): layout = self.layout