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

Fix PEP-8 warnings #1

Merged
merged 1 commit into from
Jun 19, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pep257.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def all(iterable):
if not element:
return False
return True

def any(iterable):
for element in iterable:
if element:
Expand Down Expand Up @@ -509,7 +510,7 @@ def check_return_type(def_docstring, context, is_script):
if 'return' not in def_docstring.lower():
tokens = list(tk.generate_tokens(StringIO(context).readline))
after_return = [tokens[i + 1][0] for i, token in enumerate(tokens)
if token[1] == 'return']
if token[1] == 'return']
# not very precise (tk.OP ';' is not taken into account)
if set(after_return) - set([tk.COMMENT, tk.NL, tk.NEWLINE]) != set([]):
return "PEP257 Return value type should be mentioned.",
Expand Down