Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

PEP-8 warnings #17

Closed
dpursehouse opened this issue Sep 12, 2012 · 3 comments · Fixed by #19
Closed

PEP-8 warnings #17

dpursehouse opened this issue Sep 12, 2012 · 3 comments · Fixed by #19

Comments

@dpursehouse
Copy link
Contributor

The version tagged 0.2.0 has a couple of PEP-8 warnings.

pep257.py:93:5: E301 expected 1 blank line, found 0
def any(iterable):
^
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

And

pep257.py:119:5: E301 expected 1 blank line, found 0
def cached_func(*args, **kwargs):
^
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```
@keleshev
Copy link
Contributor

I see. The test suite now includes pep257 checking itself, but not pep8.

@dpursehouse
Copy link
Contributor Author

I'll upload a fix for this in a few minutes...

@JensRantil
Copy link
Contributor

I wrote a test in another project that automatically tests PEP8 compliance. How about adding it to pep257?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants