[Bf-blender-cvs] [7719c110064] master: Cleanup: strip trailing space in Python module

Campbell Barton noreply at git.blender.org
Mon Jun 4 08:56:36 CEST 2018


Commit: 7719c110064fc6f90c93c5339681b7dd9f5cbd63
Author: Campbell Barton
Date:   Mon Jun 4 08:54:17 2018 +0200
Branches: master
https://developer.blender.org/rB7719c110064fc6f90c93c5339681b7dd9f5cbd63

Cleanup: strip trailing space in Python module

===================================================================

M	source/blender/python/bmesh/CMakeLists.txt
M	source/blender/python/bmesh/bmesh_py_types.c
M	source/blender/python/generic/CMakeLists.txt
M	source/blender/python/generic/bgl.c
M	source/blender/python/generic/bgl.h
M	source/blender/python/generic/blf_py_api.c
M	source/blender/python/generic/bpy_internal_import.c
M	source/blender/python/generic/bpy_internal_import.h
M	source/blender/python/generic/py_capi_utils.c
M	source/blender/python/intern/bpy.c
M	source/blender/python/intern/bpy_app.c
M	source/blender/python/intern/bpy_capi_utils.c
M	source/blender/python/intern/bpy_driver.c
M	source/blender/python/intern/bpy_interface.c
M	source/blender/python/intern/bpy_operator.c
M	source/blender/python/intern/bpy_props.c
M	source/blender/python/intern/bpy_rna_anim.c
M	source/blender/python/intern/bpy_rna_array.c
M	source/blender/python/intern/bpy_rna_callback.c
M	source/blender/python/mathutils/CMakeLists.txt
M	source/blender/python/mathutils/mathutils_Matrix.h
M	source/blender/python/mathutils/mathutils_interpolate.c
M	source/blender/python/mathutils/mathutils_noise.c

===================================================================

diff --git a/source/blender/python/bmesh/CMakeLists.txt b/source/blender/python/bmesh/CMakeLists.txt
index c7b86acc8f9..3b38fead7b9 100644
--- a/source/blender/python/bmesh/CMakeLists.txt
+++ b/source/blender/python/bmesh/CMakeLists.txt
@@ -18,7 +18,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-set(INC 
+set(INC
 	.
 	../../bmesh
 	../../blenkernel
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index 2866683b89b..8b5fbe03cc3 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -2149,7 +2149,7 @@ static PyObject *bpy_bmedgeseq_new(BPy_BMElemSeq *self, PyObject *args)
 		if (vert_array == NULL) {
 			return NULL;
 		}
-		
+
 		if (BM_edge_exists(vert_array[0], vert_array[1])) {
 			PyErr_SetString(PyExc_ValueError,
 			                "edges.new(): this edge exists");
diff --git a/source/blender/python/generic/CMakeLists.txt b/source/blender/python/generic/CMakeLists.txt
index df611e00d00..77214322b88 100644
--- a/source/blender/python/generic/CMakeLists.txt
+++ b/source/blender/python/generic/CMakeLists.txt
@@ -18,7 +18,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-set(INC 
+set(INC
 	.
 	../../blenkernel
 	../../blenlib
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c
index 072021c6ac9..7b9292827b0 100644
--- a/source/blender/python/generic/bgl.c
+++ b/source/blender/python/generic/bgl.c
@@ -862,7 +862,7 @@ static PyObject *Buffer_slice(Buffer *self, int begin, int end)
 {
 	PyObject *list;
 	int count;
-	
+
 	if (begin < 0) begin = 0;
 	if (end > self->dimensions[0]) end = self->dimensions[0];
 	if (begin > end) begin = end;
@@ -910,11 +910,11 @@ static int Buffer_ass_slice(Buffer *self, int begin, int end, PyObject *seq)
 {
 	PyObject *item;
 	int count, err = 0;
-	
+
 	if (begin < 0) begin = 0;
 	if (end > self->dimensions[0]) end = self->dimensions[0];
 	if (begin > end) begin = end;
-	
+
 	if (!PySequence_Check(seq)) {
 		PyErr_Format(PyExc_TypeError,
 		             "buffer[:] = value, invalid assignment. "
@@ -930,7 +930,7 @@ static int Buffer_ass_slice(Buffer *self, int begin, int end, PyObject *seq)
 		             "Expected: %d (given: %d)", count, end - begin);
 		return -1;
 	}
-	
+
 	for (count = begin; count < end; count++) {
 		item = PySequence_GetItem(seq, count - begin);
 		if (item) {
@@ -3743,4 +3743,4 @@ static PyObject *Method_ShaderSource(PyObject *UNUSED(self), PyObject *args)
 }
 
 
-/** \} */
\ No newline at end of file
+/** \} */
diff --git a/source/blender/python/generic/bgl.h b/source/blender/python/generic/bgl.h
index b27a4d6a0a4..1373c81046b 100644
--- a/source/blender/python/generic/bgl.h
+++ b/source/blender/python/generic/bgl.h
@@ -39,7 +39,7 @@ int BGL_typeSize(int type);
  * For Python access to OpenGL functions requiring a pointer.
  */
 typedef struct _Buffer {
-	PyObject_VAR_HEAD 
+	PyObject_VAR_HEAD
 	PyObject *parent;
 
 	int type;		/* GL_BYTE, GL_SHORT, GL_INT, GL_FLOAT */
diff --git a/source/blender/python/generic/blf_py_api.c b/source/blender/python/generic/blf_py_api.c
index 69f1e297b43..629335888e4 100644
--- a/source/blender/python/generic/blf_py_api.c
+++ b/source/blender/python/generic/blf_py_api.c
@@ -305,7 +305,7 @@ static PyObject *py_blf_rotation(PyObject *UNUSED(self), PyObject *args)
 
 	if (!PyArg_ParseTuple(args, "if:blf.rotation", &fontid, &angle))
 		return NULL;
-		
+
 	BLF_rotation(fontid, angle);
 
 	Py_RETURN_NONE;
diff --git a/source/blender/python/generic/bpy_internal_import.c b/source/blender/python/generic/bpy_internal_import.c
index ffac09efdde..fb89d7c9e30 100644
--- a/source/blender/python/generic/bpy_internal_import.c
+++ b/source/blender/python/generic/bpy_internal_import.c
@@ -187,7 +187,7 @@ PyObject *bpy_text_import_name(const char *name, int *found)
 	int namelen = strlen(name);
 //XXX	Main *maggie = bpy_import_main ? bpy_import_main:G.main;
 	Main *maggie = bpy_import_main;
-	
+
 	*found = 0;
 
 	if (!maggie) {
@@ -220,7 +220,7 @@ PyObject *bpy_text_import_name(const char *name, int *found)
 		return NULL;
 	else
 		*found = 1;
-	
+
 	return bpy_text_import(text);
 }
 
@@ -236,14 +236,14 @@ PyObject *bpy_text_reimport(PyObject *module, int *found)
 	const char *filepath;
 //XXX	Main *maggie = bpy_import_main ? bpy_import_main:G.main;
 	Main *maggie = bpy_import_main;
-	
+
 	if (!maggie) {
 		printf("ERROR: bpy_import_main_set() was not called before running python. this is a bug.\n");
 		return NULL;
 	}
-	
+
 	*found = 0;
-	
+
 	/* get name, filename from the module itself */
 	if ((name = PyModule_GetName(module)) == NULL)
 		return NULL;
@@ -298,15 +298,15 @@ static PyObject *blender_import(PyObject *UNUSED(self), PyObject *args, PyObject
 
 	/* import existing builtin modules or modules that have been imported already */
 	newmodule = PyImport_ImportModuleLevel(name, globals, locals, fromlist, level);
-	
+
 	if (newmodule)
 		return newmodule;
-	
+
 	PyErr_Fetch(&exception, &err, &tb); /* get the python error in case we cant import as blender text either */
-	
+
 	/* importing from existing modules failed, see if we have this module as blender text */
 	newmodule = bpy_text_import_name(name, &found);
-	
+
 	if (newmodule) { /* found module as blender text, ignore above exception */
 		PyErr_Clear();
 		Py_XDECREF(exception);
diff --git a/source/blender/python/generic/bpy_internal_import.h b/source/blender/python/generic/bpy_internal_import.h
index 905e045d657..a184087e359 100644
--- a/source/blender/python/generic/bpy_internal_import.h
+++ b/source/blender/python/generic/bpy_internal_import.h
@@ -1,4 +1,4 @@
-/* 
+/*
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
@@ -47,7 +47,7 @@ bool        bpy_text_compile(struct Text *text);
 PyObject   *bpy_text_import(struct Text *text);
 PyObject   *bpy_text_import_name(const char *name, int *found);
 PyObject   *bpy_text_reimport(PyObject *module, int *found);
-/* void		bpy_text_clear_modules(int clear_all);*/ /* Clear user modules */ 
+/* void		bpy_text_clear_modules(int clear_all);*/ /* Clear user modules */
 
 void bpy_text_filename_get(char *fn, size_t fn_len, struct Text *text);
 
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c
index 6f265b2ae87..22646462163 100644
--- a/source/blender/python/generic/py_capi_utils.c
+++ b/source/blender/python/generic/py_capi_utils.c
@@ -295,7 +295,7 @@ void PyC_LineSpit(void)
 
 	PyErr_Clear();
 	PyC_FileAndNum(&filename, &lineno);
-	
+
 	fprintf(stderr, "%s:%d\n", filename, lineno);
 }
 
@@ -317,7 +317,7 @@ void PyC_StackSpit(void)
 void PyC_FileAndNum(const char **filename, int *lineno)
 {
 	PyFrameObject *frame;
-	
+
 	if (filename) *filename = NULL;
 	if (lineno)   *lineno = -1;
 
@@ -375,22 +375,22 @@ PyObject *PyC_Object_GetAttrStringArgs(PyObject *o, Py_ssize_t n, ...)
 	Py_ssize_t i;
 	PyObject *item = o;
 	const char *attr;
-	
+
 	va_list vargs;
 
 	va_start(vargs, n);
 	for (i = 0; i < n; i++) {
 		attr = va_arg(vargs, char *);
 		item = PyObject_GetAttrString(item, attr);
-		
-		if (item) 
+
+		if (item)
 			Py_DECREF(item);
 		else /* python will set the error value here */
 			break;
-		
+
 	}
 	va_end(vargs);
-	
+
 	Py_XINCREF(item); /* final value has is increfed, to match PyObject_GetAttrString */
 	return item;
 }
@@ -839,7 +839,7 @@ void PyC_RunQuicky(const char *filepath, int n, ...)
 			}
 		}
 		va_end(vargs);
-		
+
 		/* set the value so we can access it */
 		PyDict_SetItemString(py_dict, "values", values);
 		Py_DECREF(values);
@@ -865,7 +865,7 @@ void PyC_RunQuicky(const char *filepath, int n, ...)
 				for (i = 0; i * 2 < n; i++) {
 					const char *format = va_arg(vargs, char *);
 					void *ptr = va_arg(vargs, void *);
-					
+
 					PyObject *item;
 					PyObject *item_new;
 					/* prepend the string formatting and remake the tuple */
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c
index 7150cc65942..26dc5827da1 100644
--- a/source/blender/python/intern/bpy.c
+++ b/source/blender/python/intern/bpy.c
@@ -169,7 +169,7 @@ static PyObject *bpy_user_resource(PyObject *UNUSED(self), PyObject *args, PyObj
 		PyErr_SetString(PyExc_ValueError, "invalid resource argument");
 		return NULL;
 	}
-	
+
 	/* same logic as BKE_appdir_folder_id_create(), but best leave it up to the script author to create */
 	path = BKE_appdir_folder_id(folder_id, subdir);
 
diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c
index 1e2ce372727..66c64b580f3 100644
--- a/source/blender/python/intern/bpy_app.c
+++ b/source/blender/python/intern/bpy_app.c
@@ -243,10 +243,10 @@ static int bpy_app_debug_set(PyObject *UNUSED(self), PyObject *value, void *clos
 		PyErr_SetString(PyExc_TypeError, "bpy.app.debug can only be True/False");
 		return -1;
 	}
-	
+
 	if (param)  G.debug |=  flag;
 	else        G.debug &= ~flag;
-	
+
 	return 0;
 }
 
@@ -297,7 +297,7 @@ static int bpy_app_debug_value_set(PyObject *UNUSED(self), PyObject *value, void
 		PyErr_SetString(PyExc_TypeError, "bpy.app.debug_value can only be set to a whole number");
 		return -1;
 	}
-	
+
 	G.debug_value = param;
 
 	WM_main_add_notifier(NC_WINDOW, NULL);
@@ -396,7 +396,7 @@ static void py_struct_seq_getset_init(void)
 PyObject *BPY_app_struct(void)
 {
 	PyObject *ret;
-	
+
 	PyStructSequence_InitType(&BlenderAppType, &app_info_desc);
 
 	ret = make_app_info();
diff --git a/source/blender/python/intern/bpy_capi_utils.c b/source/blender/python/intern/bpy_capi_utils.c
index 7232e4ea821..f873a8a762b 100644
--- a/source/blender/python/intern/bpy_capi_utils.c
+++ b/source/blender/python/intern/bpy_capi_utils.c
@@ -88,21 +88,21 @@ bool BPy_errors_to_report_ex(ReportList *reports, const bool use_full, const boo
 
 	if (!PyErr_Occurred())
 		return 1;
-	
+
 	/* less hassle if we allow NULL */
 	if (reports == NULL) {
 		PyErr_Print();
 		PyErr_Clear();
 		return 1;
 	}
-	
+
 	if (use_full) {
 		pystring = PyC_ExceptionBuffer();
 	}
 	else {
 		pystring = PyC_ExceptionBuffer_Simple();
 	}
-	
+
 	if (pystring == NULL) {
 		BKE_report(reports, RPT_ERROR, "Unknown py-exception, could not

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list