[WIP]ReviewBot PEP257Tool
Review Request #7101 — Created March 22, 2015 and discarded
pep257 tool
pip3 install pep257
or
easy_install pep257
Description | From | Last Updated |
---|---|---|
Col: 20 E262 inline comment should start with '# ' |
reviewbot | |
undefined name 'lnum' |
reviewbot | |
local variable 'lnum' is assigned to but never used |
reviewbot | |
Col: 20 W292 no newline at end of file |
reviewbot | |
Col: 12 E225 missing whitespace around operator |
reviewbot | |
Col: 16 E225 missing whitespace around operator |
reviewbot | |
Blank line between these. This class also needs a docstring. |
brennie | |
These should all have values, I believe. |
brennie | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Needs docstring. |
brennie | |
Needs docstring. |
brennie | |
This comment is unnecessary; the code is self explanatory. |
brennie | |
You can format this so it takes fewer lines, e.g. output = execute(['pep257', path], split_lines=True, ignore_errors=True) |
brennie | |
What happens if execution fails? You should maybe specify none_on_ignored_error in the execute call and check if it returns None. |
brennie | |
This needs some work. I assume that a line will not start with the special ' ' string the first … |
brennie | |
This is a weird string and we should document it. |
brennie | |
undefined name 'lnum' |
reviewbot | |
Left over from debugging? |
brennie | |
undefined name 'level' |
reviewbot | |
undefined name 'level' |
reviewbot | |
undefined name 'lnum' |
reviewbot | |
local variable 'lnum' is assigned to but never used |
reviewbot | |
Is this the line number? if so, can we rename this to line_number ? Also, this line number needs to … |
brennie | |
local variable 'level' is assigned to but never used |
reviewbot | |
What is level? |
brennie | |
Col: 20 W292 no newline at end of file |
reviewbot | |
Col: 13 E126 continuation line over-indented for hanging indent |
reviewbot | |
Col: 13 E122 continuation line missing indentation or outdented |
reviewbot | |
Col: 13 E122 continuation line missing indentation or outdented |
reviewbot | |
Col: 13 E122 continuation line missing indentation or outdented |
reviewbot | |
Col: 13 E122 continuation line missing indentation or outdented |
reviewbot | |
Col: 9 E122 continuation line missing indentation or outdented |
reviewbot | |
Col: 10 E231 missing whitespace after ',' |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
undefined name 'lnum' |
reviewbot | |
undefined name 'level' |
reviewbot | |
local variable 'lnum' is assigned to but never used |
reviewbot | |
local variable 'level' is assigned to but never used |
reviewbot | |
Col: 20 W292 no newline at end of file |
reviewbot | |
Col: 13 E126 continuation line over-indented for hanging indent |
reviewbot | |
Col: 13 E122 continuation line missing indentation or outdented |
reviewbot | |
Col: 13 E122 continuation line missing indentation or outdented |
reviewbot | |
Col: 13 E122 continuation line missing indentation or outdented |
reviewbot | |
Col: 13 E122 continuation line missing indentation or outdented |
reviewbot | |
Col: 9 E122 continuation line missing indentation or outdented |
reviewbot | |
Col: 10 E231 missing whitespace after ',' |
reviewbot | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Col: 20 W292 no newline at end of file |
reviewbot | |
Col: 80 E501 line too long (112 > 79 characters) |
reviewbot | |
This file should not be in the diff. |
brennie | |
Can this be formatted like: options = [ { 'name': 'ignore', # ... 'field_options': { 'label': 'Ignore', # ... }, … |
brennie | |
Docstrings should be of the form """Single line summary. Multi-line description. """ |
brennie | |
Col: 80 E501 line too long (112 > 79 characters) |
reviewbot | |
Docstrings should be of the form """Single line summary. Multi-line description. """ |
brennie | |
We don't really use :param foo: in the codebase. |
brennie | |
Blank line between these. |
brennie | |
Blank line between these. |
brennie | |
Since you're returning True in either case, you can do ```python if output: for line in output: # ... return … |
brennie | |
Col: 80 E501 line too long (103 > 79 characters) |
reviewbot | |
Again, can you make ' ' * 8 a constant on the class? You can document it there. |
brennie | |
Col: 80 E501 line too long (81 > 79 characters) |
reviewbot | |
Is the code helpful? |
brennie | |
Col: 29 E131 continuation line unaligned for hanging indent |
reviewbot | |
Col: 80 E501 line too long (104 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (86 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (81 > 79 characters) |
reviewbot | |
Col: 29 E131 continuation line unaligned for hanging indent |
reviewbot | |
Col: 1 E302 expected 2 blank lines, found 1 |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Col: 1 E302 expected 2 blank lines, found 1 |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
This needs a better docstring. |
brennie | |
Single quotes for strings. |
brennie | |
Docstrings should be of the format: """Single line summary. Multi-line description. """ |
brennie | |
Docstrings should be of the format: """Single line summary. Multi-line description. """ |
brennie | |
Blank line between block and statement. |
brennie | |
Blank line between statement and block. |
brennie | |
Blank line between block and statement. |
brennie | |
This should be on the class (with the comment before it). See issue in my previous review. |
brennie | |
Blank line between these. |
brennie | |
I'd prefer len(msg_start) over just 8 here. |
brennie | |
Why not code, msg = line[len(msg_start):].split(':', 1) |
brennie | |
Blank line between end of block and a statement. |
brennie | |
Col: 5 E301 expected 1 blank line, found 0 |
reviewbot | |
This isn't really a model. |
brennie | |
Blank line between paragraphs in docstrings. |
brennie | |
"Review Bot" "interface to" |
brennie | |
This should go before the _MSG_START constant. Also, make sure to use proper capitalization and ensure that it ends with … |
brennie | |
Col: 5 E301 expected 1 blank line, found 0 |
reviewbot | |
Blank line between statement and block. |
brennie | |
You should maybe comment on the format of the output of pep257. You can just put an example of the … |
brennie |
- Change Summary:
-
an easy pep257tool without option
- Commit:
-
36fa2997a398dd99a9af81f9be2138e568917928fd1c1c570c45891afbd1d50b3c91722ed5c10ae9
- Diff:
-
Revision 2 (+45)
-
Tool: PEP8 Style Checker Processed Files: bot/reviewbot/tools/pep257.py Tool: Pyflakes Processed Files: bot/reviewbot/tools/pep257.py
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
You can format this so it takes fewer lines, e.g.
output = execute(['pep257', path], split_lines=True, ignore_errors=True)
-
What happens if execution fails? You should maybe specify
none_on_ignored_error
in theexecute
call and check if it returnsNone
. -
This needs some work.
I assume that a line will not start with the special
' '
string the first time and solnum
andlevel
will get set. Is this guaranteed? If not, this needs to be more robust.However, the static analysis tool doesn't know that. You should set
lnum
andlevel
toNone
before thefor
loop. -
-
-
Is this the line number? if so, can we rename this to
line_number
?Also, this line number needs to be checked to see that is within the changed lines in the diff. We don't want to comment on unchanged lines.
-
- Change Summary:
-
pep257tool with ignore
- Commit:
-
fd1c1c570c45891afbd1d50b3c91722ed5c10ae92b8e857f098446b76127a6b87ad1e745a61da102
- Diff:
-
Revision 3 (+55)
-
Tool: PEP8 Style Checker Processed Files: bot/reviewbot/tools/pep257.py Tool: Pyflakes Processed Files: bot/reviewbot/tools/pep257.py
-
-
-
-
-
-
-
-
-
-
-
-
-
- Change Summary:
-
PEP257 tool
- Commit:
-
2b8e857f098446b76127a6b87ad1e745a61da1028ba37434483206b60ee9cc37b7a8fd5289dcb914
- Diff:
-
Revision 4 (+69)
-
Tool: Pyflakes Processed Files: bot/reviewbot/tools/pep257.py Tool: PEP8 Style Checker Processed Files: bot/reviewbot/tools/pep257.py
-
-
-
-
-
-
-
-
-
- Change Summary:
-
bug fix
- People:
-
Tool: Pyflakes Processed Files: bot/setup.py bot/reviewbot/tools/pep257.py Ignored Files: bot/reviewbot-cookies.txt Tool: PEP8 Style Checker Processed Files: bot/setup.py bot/reviewbot/tools/pep257.py Ignored Files: bot/reviewbot-cookies.txt
-
-
-
- Change Summary:
-
modify docstring
- Commit:
-
facfa505e9a56546e70ed228bf620429e54e0b7d3f56dfec05e741c526a7a3dce24ef424d7a8615a
-
Tool: PEP8 Style Checker Processed Files: bot/setup.py bot/reviewbot/tools/pep257.py Ignored Files: bot/reviewbot-cookies.txt Tool: Pyflakes Processed Files: bot/setup.py bot/reviewbot/tools/pep257.py Ignored Files: bot/reviewbot-cookies.txt
-
-
-
-
- Change Summary:
-
modify too long line
- Commit:
-
3f56dfec05e741c526a7a3dce24ef424d7a8615aba79c8f9985acd34c5982a4c52593eadcce207fe
-
Tool: Pyflakes Processed Files: bot/setup.py bot/reviewbot/tools/pep257.py Ignored Files: bot/reviewbot-cookies.txt Tool: PEP8 Style Checker Processed Files: bot/setup.py bot/reviewbot/tools/pep257.py Ignored Files: bot/reviewbot-cookies.txt
-
- Change Summary:
-
align
- Commit:
-
ba79c8f9985acd34c5982a4c52593eadcce207fe2c0c90f75eb1e9e26d7011208f8fa48faef2a466
-
Tool: PEP8 Style Checker Processed Files: bot/setup.py bot/reviewbot/tools/pep257.py Ignored Files: bot/reviewbot-cookies.txt Tool: Pyflakes Processed Files: bot/setup.py bot/reviewbot/tools/pep257.py Ignored Files: bot/reviewbot-cookies.txt
-
Tool: PEP8 Style Checker Processed Files: bot/reviewbot/tools/shellcheck.py bot/setup.py bot/reviewbot/tools/pep257.py Ignored Files: bot/reviewbot-cookies.txt Tool: Pyflakes Processed Files: bot/reviewbot/tools/shellcheck.py bot/setup.py bot/reviewbot/tools/pep257.py Ignored Files: bot/reviewbot-cookies.txt
-
-
-
Tool: PEP8 Style Checker Processed Files: bot/reviewbot/tools/shellcheck.py bot/setup.py bot/reviewbot/tools/pep257.py Ignored Files: bot/reviewbot-cookies.txt Tool: Pyflakes Processed Files: bot/reviewbot/tools/shellcheck.py bot/setup.py bot/reviewbot/tools/pep257.py Ignored Files: bot/reviewbot-cookies.txt
-
-
-
Tool: PEP8 Style Checker Processed Files: bot/setup.py bot/reviewbot/tools/pep257.py Ignored Files: bot/reviewbot-cookies.txt Tool: Pyflakes Processed Files: bot/setup.py bot/reviewbot/tools/pep257.py Ignored Files: bot/reviewbot-cookies.txt
-
<p>It seems you've accidentally removed the <code>.gitignore</code> from the repository. Please undo this change.</p>
<p>You can undo this by doing <code>git checkout master -- .gitignore</code> and then commiting the change.</p> -
-
-
-
This should go before the
_MSG_START
constant.Also, make sure to use proper capitalization and ensure that it ends with a period.
-
-
You should maybe comment on the format of the output of
pep257
. You can just put an example of the output, that would be fine.