diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-09-14 22:13:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-09-14 22:18:05 +0300 |
commit | 2743eaf24edef926efe66ae5a0fabc2fbf16a666 (patch) | |
tree | 9f8815c1e5c19522092778423ef20ecdd34d15b2 /release/scripts | |
parent | 2b9f4bcfa07046c2485db4d9cc2bc465c2582d39 (diff) |
Cleanup: pep8
Quiet pylint warnings on keymaps.
Diffstat (limited to 'release/scripts')
4 files changed, 23 insertions, 22 deletions
diff --git a/release/scripts/presets/keyconfig/blender.py b/release/scripts/presets/keyconfig/blender.py index 60684be9163..8a7689d6d60 100644 --- a/release/scripts/presets/keyconfig/blender.py +++ b/release/scripts/presets/keyconfig/blender.py @@ -5,15 +5,15 @@ from bpy.props import ( EnumProperty, ) -dirname, filename = os.path.split(__file__) -idname = os.path.splitext(filename)[0] +DIRNAME, FILENAME = os.path.split(__file__) +IDNAME = os.path.splitext(FILENAME)[0] def update_fn(_self, _context): load() class Prefs(bpy.types.KeyConfigPreferences): - bl_idname = idname + bl_idname = IDNAME select_mouse: EnumProperty( name="Select Mouse", @@ -154,7 +154,7 @@ class Prefs(bpy.types.KeyConfigPreferences): col.prop(self, "use_v3d_shade_ex_pie") -blender_default = bpy.utils.execfile(os.path.join(dirname, "keymap_data", "blender_default.py")) +blender_default = bpy.utils.execfile(os.path.join(DIRNAME, "keymap_data", "blender_default.py")) def load(): @@ -163,7 +163,7 @@ def load(): from bl_keymap_utils.io import keyconfig_init_from_data prefs = context.preferences - kc = context.window_manager.keyconfigs.new(idname) + kc = context.window_manager.keyconfigs.new(IDNAME) kc_prefs = kc.preferences keyconfig_data = blender_default.generate_keymaps( diff --git a/release/scripts/presets/keyconfig/blender_27x.py b/release/scripts/presets/keyconfig/blender_27x.py index 052f5dd706a..4ce77f46213 100644 --- a/release/scripts/presets/keyconfig/blender_27x.py +++ b/release/scripts/presets/keyconfig/blender_27x.py @@ -4,15 +4,15 @@ from bpy.props import ( EnumProperty, ) -dirname, filename = os.path.split(__file__) -idname = os.path.splitext(filename)[0] +DIRNAME, FILENAME = os.path.split(__file__) +IDNAME = os.path.splitext(FILENAME)[0] def update_fn(_self, _context): load() class Prefs(bpy.types.KeyConfigPreferences): - bl_idname = idname + bl_idname = IDNAME select_mouse: EnumProperty( name="Select Mouse", @@ -39,7 +39,7 @@ class Prefs(bpy.types.KeyConfigPreferences): split.column() -blender_default = bpy.utils.execfile(os.path.join(dirname, "keymap_data", "blender_default.py")) +blender_default = bpy.utils.execfile(os.path.join(DIRNAME, "keymap_data", "blender_default.py")) def load(): from sys import platform @@ -47,7 +47,7 @@ def load(): from bl_keymap_utils.io import keyconfig_init_from_data prefs = context.preferences - kc = context.window_manager.keyconfigs.new(idname) + kc = context.window_manager.keyconfigs.new(IDNAME) kc_prefs = kc.preferences keyconfig_data = blender_default.generate_keymaps( diff --git a/release/scripts/presets/keyconfig/industry_compatible.py b/release/scripts/presets/keyconfig/industry_compatible.py index b7f069c7418..09a43452e93 100644 --- a/release/scripts/presets/keyconfig/industry_compatible.py +++ b/release/scripts/presets/keyconfig/industry_compatible.py @@ -5,14 +5,14 @@ import bpy # ------------------------------------------------------------------------------ # Keymap -dirname, filename = os.path.split(__file__) -idname = os.path.splitext(filename)[0] +DIRNAME, FILENAME = os.path.split(__file__) +IDNAME = os.path.splitext(FILENAME)[0] def update_fn(_self, _context): load() -industry_compatible = bpy.utils.execfile(os.path.join(dirname, "keymap_data", "industry_compatible_data.py")) +industry_compatible = bpy.utils.execfile(os.path.join(DIRNAME, "keymap_data", "industry_compatible_data.py")) def load(): @@ -21,7 +21,7 @@ def load(): prefs = bpy.context.preferences - kc = bpy.context.window_manager.keyconfigs.new(idname) + kc = bpy.context.window_manager.keyconfigs.new(IDNAME) params = industry_compatible.Params(use_mouse_emulate_3_button=prefs.inputs.use_mouse_emulate_3_button) keyconfig_data = industry_compatible.generate_keymaps(params) diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index a4ae34b445c..9dc23aaf22e 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -1059,9 +1059,10 @@ def km_view3d(params): ("view3d.view_axis", {"type": 'NDOF_BUTTON_TOP', "value": 'PRESS', "shift": True}, {"properties": [("type", 'TOP'), ("align_active", True)]}), # Selection. - *(("view3d.select", - {"type": params.select_mouse, "value": params.select_mouse_value, **{m: True for m in mods}}, - {"properties": [(c, True) for c in props]}, + *(( + "view3d.select", + {"type": params.select_mouse, "value": params.select_mouse_value, **{m: True for m in mods}}, + {"properties": [(c, True) for c in props]}, ) for props, mods in ( (("deselect_all",) if not params.legacy else (), ()), (("toggle",), ("shift",)), @@ -2432,10 +2433,10 @@ def km_sequencer(params): {"properties": [("mode", 'TIME_EXTEND')]}), ("marker.add", {"type": 'M', "value": 'PRESS'}, None), ("marker.rename", {"type": 'M', "value": 'PRESS', "ctrl": True}, None), - ("sequencer.select",{"type": 'LEFT_BRACKET', "value": 'PRESS'}, - {"properties": [("left_right", 'LEFT'), ("linked_time", True)]}), - ("sequencer.select",{"type": 'RIGHT_BRACKET', "value": 'PRESS'}, - {"properties": [("left_right", 'RIGHT'), ("linked_time", True)]}), + ("sequencer.select", {"type": 'LEFT_BRACKET', "value": 'PRESS'}, + {"properties": [("left_right", 'LEFT'), ("linked_time", True)]}), + ("sequencer.select", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, + {"properties": [("left_right", 'RIGHT'), ("linked_time", True)]}), ]) return keymap @@ -3277,7 +3278,7 @@ def km_grease_pencil_stroke_sculpt_mode(params): return keymap -def km_grease_pencil_stroke_weight_mode(params): +def km_grease_pencil_stroke_weight_mode(_params): items = [] keymap = ( "Grease Pencil Stroke Weight Mode", |