Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-19 20:17:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-19 20:17:35 +0400
commitd9e99abe3753591d510dbb58813bbc29e3381b57 (patch)
tree85d247d274f8c9d2650f6df4d3c8a6ac2f25e7bc /source/tests
parentddf207b7c3d1cafb0485da268608b1fc875c13f0 (diff)
hide overly picky warnings from 'pylint' for pep8 script, indentation edits.
Diffstat (limited to 'source/tests')
-rw-r--r--source/tests/pep8.py27
1 files changed, 24 insertions, 3 deletions
diff --git a/source/tests/pep8.py b/source/tests/pep8.py
index f7c416553b2..0c7c90a2382 100644
--- a/source/tests/pep8.py
+++ b/source/tests/pep8.py
@@ -16,7 +16,7 @@
#
# ##### END GPL LICENSE BLOCK #####
-# <pep8 compliant>
+# <pep8-80 compliant>
import os
@@ -37,6 +37,7 @@ import os
# should be directly after the licence header, ~20 in most cases
PEP8_SEEK_COMMENT = 40
SKIP_PREFIX = "./tools", "./config", "./scons", "./extern"
+FORCE_PEP8_ALL = False
def file_list_py(path):
@@ -75,7 +76,7 @@ def main():
if [None for prefix in SKIP_PREFIX if f.startswith(prefix)]:
continue
- pep8_type = is_pep8(f)
+ pep8_type = FORCE_PEP8_ALL or is_pep8(f)
if pep8_type:
# so we can batch them for each tool.
@@ -112,7 +113,27 @@ def main():
print("\n\n\n# running pylint...")
for f, pep8_type in files:
# let pep8 complain about line length
- os.system("pylint --reports=n --max-line-length=1000 '%s'" % f)
+ os.system("pylint "
+ "--disable="
+ "C0111," # missing docstring
+ "C0103," # invalid name
+ "W0613," # unused argument, may add this back
+ # but happens a lot for 'context' for eg.
+ "W0232," # class has no __init__, Operator/Panel/Menu etc
+ "W0142," # Used * or ** magic
+ # even needed in some cases
+ "R0903," # bake_action] Too many statements (68/50)
+ "R0911," # Too many return statements
+ "R0912," # Too many branches
+ "R0913," # Too many arguments
+ "R0914," # Too many local variables
+ "R0915," # bake_action] Too many statements (68/50)
+ " "
+ "--include-ids=y "
+ "--output-format=parseable "
+ "--reports=n "
+ "--max-line-length=1000"
+ " '%s'" % f)
if __name__ == "__main__":
main()