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/rst_to_doctree_mini.py | |
parent | 5aade17bdf0f9d230c2e0bb7a97ead21a48895af (diff) |
Cleanup: pep8
Diffstat (limited to 'tests/python/rst_to_doctree_mini.py')
-rw-r--r-- | tests/python/rst_to_doctree_mini.py | 21 |
1 files changed, 13 insertions, 8 deletions
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() |