With this change, the successful output of running the inspectdb command complies with style guidelines set forth in /docs/internals/contributing/writing-code/coding-style.txt. While that document refers to the best practices when coding for The Django Project, and not a developer's own project, I feel that consistency with internal practices is good.
I've added a test that checks for this behavior using the 3rd-party pep8 Python library (included).
I like the change, but prefer we don't bundle pep8. How about if we skip the test if pep8 isn't installed? There are other tests that do this for other libraries you can reference.
I like that better, too. Other tests I looked at did it the bad way, so I followed suit. Pull-branch updated to realize @timgraham's suggestion.
The HAS_PEP8 constant is unnecessary IMO.
pep8 = None
@unittest.skipIf(pep8 is None, "needs pep8")
After thinking about it a bit more, I suggest we leave out the test for this. I don't think the chance of a regression here is very large and the test is rather complex.
Adjusted inspectdb management command to yield PEP 8-compliant output…
… barring Django Coding Style exceptions.
Adjusted pull request commit to include only the changes to the inspectdb output and pre-existing tests of that output.
Thanks Justin, merged in 298a2b5.