diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-06-07 06:54:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-06-07 10:28:02 +0300 |
commit | bf010c4a15840964ec92912e5582095d029bc314 (patch) | |
tree | d3f48d2eb0c3a6dfef1e30df98de73a754ef649c /tests/python | |
parent | 5aade17bdf0f9d230c2e0bb7a97ead21a48895af (diff) |
Cleanup: pep8
Diffstat (limited to 'tests/python')
-rw-r--r-- | tests/python/bl_run_operators.py | 2 | ||||
-rw-r--r-- | tests/python/pep8.py | 13 | ||||
-rw-r--r-- | tests/python/rst_to_doctree_mini.py | 21 |
3 files changed, 26 insertions, 10 deletions
diff --git a/tests/python/bl_run_operators.py b/tests/python/bl_run_operators.py index d511cd19ff7..f3c553cf3ef 100644 --- a/tests/python/bl_run_operators.py +++ b/tests/python/bl_run_operators.py @@ -163,7 +163,7 @@ if USE_ATTRSET: if issubclass(cls, skip_classes): continue - ## to support skip-save we cant get all props + # # to support skip-save we cant get all props # properties = cls.bl_rna.properties.keys() properties = [] for prop_id, prop in cls.bl_rna.properties.items(): diff --git a/tests/python/pep8.py b/tests/python/pep8.py index 551e2a87e9b..0d6db729767 100644 --- a/tests/python/pep8.py +++ b/tests/python/pep8.py @@ -117,7 +117,18 @@ def main(): # these are very picky and often hard to follow # while keeping common script formatting. - ignore = "E122", "E123", "E124", "E125", "E126", "E127", "E128" + ignore = ( + "E122", + "E123", + "E124", + "E125", + "E126", + "E127", + "E128", + # "imports not at top of file." + # prefer to load as needed (lazy load addons etc). + "E402", + ) for f, pep8_type in files: diff --git a/tests/python/rst_to_doctree_mini.py b/tests/python/rst_to_doctree_mini.py index 6a885a108f8..dfc6cd57db6 100644 --- a/tests/python/rst_to_doctree_mini.py +++ b/tests/python/rst_to_doctree_mini.py @@ -28,13 +28,14 @@ import collections -Directive = collections.namedtuple('Directive', - ("type", - "value", - "value_strip", - "line", - "indent", - "members")) +Directive = collections.namedtuple( + "Directive", + ("type", + "value", + "value_strip", + "line", + "indent", + "members")) def parse_rst_py(filepath): @@ -80,7 +81,7 @@ def parse_rst_py(filepath): return tree[0] -if __name__ == "__main__": +def main(): # not intended use, but may as well print rst files passed as a test. import sys for arg in sys.argv: @@ -88,3 +89,7 @@ if __name__ == "__main__": items = parse_rst_py(arg) for i in items: print(i) + + +if __name__ == "__main__": + main() |