From 63810ffcef825930b034899f54107fc35b159349 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 3 Jul 2012 09:02:41 +0000 Subject: Style edit (mostly), use """ for docstrings (not '''). Should also fix the broken py ops tips... --- release/scripts/modules/animsys_refactor.py | 4 ++-- release/scripts/modules/bpy/ops.py | 20 ++++++++++---------- release/scripts/modules/bpy_extras/mesh_utils.py | 12 ++++++------ release/scripts/modules/bpyml_ui.py | 4 ++-- release/scripts/modules/console_python.py | 4 ++-- release/scripts/modules/rna_info.py | 4 ++-- 6 files changed, 24 insertions(+), 24 deletions(-) (limited to 'release/scripts/modules') diff --git a/release/scripts/modules/animsys_refactor.py b/release/scripts/modules/animsys_refactor.py index 06c449afd41..fd6087b38e6 100644 --- a/release/scripts/modules/animsys_refactor.py +++ b/release/scripts/modules/animsys_refactor.py @@ -157,8 +157,8 @@ def find_path_new(id_data, data_path, rna_update_dict, rna_update_from_map): def update_data_paths(rna_update): - ''' rna_update triple [(class_name, from, to), ...] - ''' + """ rna_update triple [(class_name, from, to), ...] + """ # make a faster lookup dict rna_update_dict = {} diff --git a/release/scripts/modules/bpy/ops.py b/release/scripts/modules/bpy/ops.py index c4e7e6ac19e..34beb6035ae 100644 --- a/release/scripts/modules/bpy/ops.py +++ b/release/scripts/modules/bpy/ops.py @@ -31,16 +31,16 @@ op_get_instance = ops_module.get_instance class BPyOps(object): - ''' + """ Fake module like class. bpy.ops - ''' + """ def __getattr__(self, module): - ''' + """ gets a bpy.ops submodule - ''' + """ if module.startswith('__'): raise AttributeError(module) return BPyOpsSubMod(module) @@ -69,20 +69,20 @@ class BPyOps(object): class BPyOpsSubMod(object): - ''' + """ Utility class to fake submodules. eg. bpy.ops.object - ''' + """ __keys__ = ("module",) def __init__(self, module): self.module = module def __getattr__(self, func): - ''' + """ gets a bpy.ops.submodule function - ''' + """ if func.startswith('__'): raise AttributeError(func) return BPyOpsSubModOp(self.module, func) @@ -105,11 +105,11 @@ class BPyOpsSubMod(object): class BPyOpsSubModOp(object): - ''' + """ Utility class to fake submodule operators. eg. bpy.ops.object.somefunc - ''' + """ __keys__ = ("module", "func") diff --git a/release/scripts/modules/bpy_extras/mesh_utils.py b/release/scripts/modules/bpy_extras/mesh_utils.py index efd69f91a8b..ad0fe06b68b 100644 --- a/release/scripts/modules/bpy_extras/mesh_utils.py +++ b/release/scripts/modules/bpy_extras/mesh_utils.py @@ -319,7 +319,7 @@ def edge_loops_from_edges(mesh, edges=None): def ngon_tessellate(from_data, indices, fix_loops=True): - ''' + """ Takes a polyline of indices (fgon) and returns a list of face indicie lists. Designed to be used for importers that need indices for an fgon to create from existing verts. @@ -329,7 +329,7 @@ def ngon_tessellate(from_data, indices, fix_loops=True): to fill, and can be a subset of the data given. fix_loops: If this is enabled polylines that use loops to make multiple polylines are delt with correctly. - ''' + """ from mathutils.geometry import tessellate_polygon from mathutils import Vector @@ -352,9 +352,9 @@ def ngon_tessellate(from_data, indices, fix_loops=True): return v1[1], v2[1] if not fix_loops: - ''' + """ Normal single concave loop filling - ''' + """ if type(from_data) in {tuple, list}: verts = [Vector(from_data[i]) for ii, i in enumerate(indices)] else: @@ -368,10 +368,10 @@ def ngon_tessellate(from_data, indices, fix_loops=True): fill = tessellate_polygon([verts]) else: - ''' + """ Seperate this loop into multiple loops be finding edges that are used twice. This is used by lightwave LWO files a lot - ''' + """ if type(from_data) in {tuple, list}: verts = [vert_treplet(Vector(from_data[i]), ii) diff --git a/release/scripts/modules/bpyml_ui.py b/release/scripts/modules/bpyml_ui.py index a7e2e7bc04a..b4ad4e0b54a 100644 --- a/release/scripts/modules/bpyml_ui.py +++ b/release/scripts/modules/bpyml_ui.py @@ -85,10 +85,10 @@ def _call_recursive(context, base, py_node): class BPyML_BaseUI(): - ''' + """ This is a mix-in class that defines a draw function which checks for draw_data - ''' + """ def draw(self, context): layout = self.layout diff --git a/release/scripts/modules/console_python.py b/release/scripts/modules/console_python.py index b5985d2c851..2aaadb17b71 100644 --- a/release/scripts/modules/console_python.py +++ b/release/scripts/modules/console_python.py @@ -48,14 +48,14 @@ def replace_help(namespace): def get_console(console_id): - ''' + """ helper function for console operators currently each text data block gets its own console - code.InteractiveConsole() ...which is stored in this function. console_id can be any hashable type - ''' + """ from code import InteractiveConsole consoles = getattr(get_console, "consoles", None) diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py index 7eccda74e14..0ef2ac5164d 100644 --- a/release/scripts/modules/rna_info.py +++ b/release/scripts/modules/rna_info.py @@ -437,9 +437,9 @@ def BuildRNAInfo(): # rna_functions_dict = {} # store all functions directly in this type (not inherited) def full_rna_struct_path(rna_struct): - ''' + """ Needed when referencing one struct from another - ''' + """ nested = rna_struct.nested if nested: return "%s.%s" % (full_rna_struct_path(nested), rna_struct.identifier) -- cgit v1.2.3