"bzr version-info --python" does not give pep-8 compliant output
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Undecided
|
Soren Hansen |
Bug Description
$ bzr version-info --python > version_info.py ; pep8 --show-pep8 --show-source version_info.py
version_
if __name__ == '__main__':
^
Separate top-level function and class definitions with two blank lines.
Method definitions inside a class are separated by a single blank line.
Extra blank lines may be used (sparingly) to separate groups of related
functions. Blank lines may be omitted between a bunch of related
one-liners (e.g. a set of dummy implementations).
Use blank lines in functions, sparingly, to indicate logical sections.
Okay: def a():\n pass\n\n\ndef b():\n pass
Okay: def a():\n pass\n\n\n# Foo\n# Bar\n\ndef b():\n pass
E301: class Foo:\n b = 0\n def bar():\n pass
E302: def a():\n pass\n\ndef b(n):\n pass
E303: def a():\n pass\n\n\n\ndef b(n):\n pass
E303: def a():\n\n\n\n pass
E304: @decorator\n\ndef a():\n pass
Related branches
- Martin Pool: Approve
- John A Meinel: Approve
-
Diff: 38 lines (+5/-1)3 files modifiedbzrlib/tests/__init__.py (+4/-0)
bzrlib/tests/test_version_info.py (+1/-0)
bzrlib/version_info_formats/format_python.py (+0/-1)
Changed in bzr: | |
status: | New → In Progress |
assignee: | nobody → Soren Hansen (soren) |
Changed in bzr: | |
milestone: | none → 2.3b5 |
Changed in bzr: | |
status: | In Progress → Fix Released |
As a follow on, it might be nice to make bzr's test_source run pep8
checks if the tools to do so are available. That would be better than
recreating some of them by hand.
--
Martin