17
6
Your task is to write a file which contains a line with many pep8 violations.
The rules:
- We use pep8 version 1.5.7 and the default settings.
- Calling pep8 with other command line options or using a custom rc file is not allowed.
- Maximum line length 120 characters. You can violate E501, sure, but the line which your score is calculated on has to be <= 120 characters.
- Your module can have other lines before or after, but only one line contributes to your score.
- Your file can contain SyntaxErrors or any kind of garbage, it needn't import or run.
Example of scoring:
The following module thing.py
has a score of 2, because it contains a line (line 1) with 2 pep8 violations.
spam='potato'
To check a score:
~$ mktmpenv
(tmp-ae3045bd2f629a8c)~/.virtualenvs/tmp-ae3045bd2f629a8c$ pip install pep8==1.5.7
(tmp-ae3045bd2f629a8c)~/.virtualenvs/tmp-ae3045bd2f629a8c$ echo -n "spam='potato'" > thing.py
(tmp-ae3045bd2f629a8c)~/.virtualenvs/tmp-ae3045bd2f629a8c$ pep8 thing.py
thing.py:1:5: E225 missing whitespace around operator
thing.py:1:14: W292 no newline at end of file
2Is this a... language-specific challenge? Because we don't really like these. – John Dvorak – 2014-07-15T17:37:10.777
I guess it's not really language specific (because the file can contain any garbage) but obviously people familiar with python coding will have some advantage – wim – 2014-07-15T17:38:06.083