I noticed stuff like this in the latest commits in specto-woutc:
-
-
+
class FacebookRequest():
-
def __init__(self, request):
self.request = request
-
-
+
class FacebookWall():
-
def __init__(self, poster, post):
self.poster = poster
self.post = post
Those blank lines were there for strict PEP-8 compliance. Quote from the guidelines:
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.
However, enforcing guidelines is not especially fun. Ideally, I'd like it if bazaar could warn us about PEP-8 errors before commit, so that these kinds of mistakes are automatically prevented. I think it could be done with
http://schettino72.wordpress.com/2008/01/20/how-to-execute-tests-on-a-bazaar-pre-commit-hook/
And then we could add that to the dev guidelines on the wiki. Whaddyathink? And are there other tests that could be run on specto before commits?