From 135f5550ed1b739b49a811529e1fb9ae0c0d5f4c Mon Sep 17 00:00:00 2001 From: Campbell Barton <ideasman42@gmail.com> Date: Thu, 13 Feb 2014 08:52:13 +1100 Subject: [PATCH] style cleanup --- check_source/check_descriptions.py | 1 + check_source/check_style_c.py | 5 ++--- utils/blender_update_themes.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/check_source/check_descriptions.py b/check_source/check_descriptions.py index 35e986d..13ef871 100644 --- a/check_source/check_descriptions.py +++ b/check_source/check_descriptions.py @@ -136,6 +136,7 @@ def check_duplicates(): if test: print("Invalid 'DUPLICATE_WHITELIST': %r" % test) + def main(): check_duplicates() diff --git a/check_source/check_style_c.py b/check_source/check_style_c.py index 5796cc3..9f737d2 100755 --- a/check_source/check_style_c.py +++ b/check_source/check_style_c.py @@ -415,8 +415,6 @@ def blender_check_kw_if(index_kw_start, index_kw, index_kw_end): del ws_indent del l_last - - # check for: if () { ... }; # # no need to have semicolon after brace. @@ -565,7 +563,6 @@ def blender_check_kw_switch(index_kw_start, index_kw, index_kw_end): #~ print("Commment '%s'" % tokens[i].text) pass - elif tokens[i].type == Token.Keyword: if tokens[i].text in {"break", "return", "continue", "goto"}: if tokens[i_case].line == tokens[i].line: @@ -927,6 +924,7 @@ import re re_ifndef = re.compile("^\s*#\s*ifndef\s+([A-z0-9_]+).*$") re_define = re.compile("^\s*#\s*define\s+([A-z0-9_]+).*$") + def quick_check_include_guard(lines): found = 0 def_value = "" @@ -982,6 +980,7 @@ def quick_check_source(fp, code, args): quick_check_indentation(lines) + def scan_source(fp, code, args): # print("scanning: %r" % fp) diff --git a/utils/blender_update_themes.py b/utils/blender_update_themes.py index db82a07..f9a4545 100644 --- a/utils/blender_update_themes.py +++ b/utils/blender_update_themes.py @@ -20,7 +20,7 @@ # this script updates XML themes once new settings are added # -# ./blender.bin --background --python source/tools/update_themes.py +# ./blender.bin --background --python source/tools/utils/blender_update_themes.py import bpy import os -- GitLab