Incorporate 'flake8' linting via Travis CI#107
Incorporate 'flake8' linting via Travis CI#107frewsxcv wants to merge 1 commit intobarosl:masterfrom frewsxcv:flake8
Conversation
|
If this PR is desired, Travis will need to be enabled for this repository |
.travis.yml
Outdated
There was a problem hiding this comment.
For now at least, I've disabled warnings related to line lengths being >80 characters
There was a problem hiding this comment.
You could also make it such that the longest line currently is what you set for max-line-length.
|
I have a mixed feeling about PEP 8... I really like to keep things one-line if that makes sense, and somehow cannot help feeling the urge to write something like But at the same time, it is true that this greatly helps multiple people collaborating on the same code base. It also seems to be wanted often, as there was already a PR that suggested the PEP 8 linting. But it was forgotten and silently closed... I felt bad about the author at the time. |
This is a bad practice because one should be grouping things visually via parens, otherwise someone could write something like
Not really, no. Flake8 is more than style (e.g. catches unused imports, undefined variables, etc.) which is very important.
Why do you feel this way? |
This is a valid concern, I think.
That's interesting! I didn't know it even catches undefined variables. I definitely need to read the manual some day.
I think using different options means using a slightly different version of PEP 8, leading to multiple style standards out there that are largely compatible, but still slightly incompatible. So if I'm to adhere to PEP 8, I think I should follow all of its rules. The problem is, like I said above, it is really hard for me to like some rules defined in PEP 8. 😢 But, I think this "all-or-nothing" obsession is my mental problem that needs to be addressed some day. Maybe now. |
|
So using a configuration file (e.g., tox.ini, setup.cfg, .flake8) and storing the exceptions or modifications can become your style guide. Each OpenStack project has it's own style guide enumerated in their As the maintainer of Flake8, I tend to frown on people adding Flake8 to projects without the owner's consent, but the ideology of the tool is to help enforce a Style Guide. That Style Guide can be tweaked, added to, etc. by you the user and we try to be flexible. If you have questions, I'm happy to help, but I have no strong opinions on whether you start using Flake8 or not. :) |
|
I wholly agree with the 80 column thing. It's crazy. But I'd say flake8/pylint are worth it, let's just go with the config file? Probably we should land this after merging most of the outstanding PRs so as to not cause lots of merge conflicts. |
|
Worth mentioning that #134 also includes flake8 integration. |
|
I recommend closing this in favor of #134. No conflict in that PR and it includes this as noted. |
|
@barosl I understand your all-or-nothing thought. I tend to be a little overzealous on code conventions myself and fall into this bucket sometimes. It is possible to turn off or modify specific errors via |
|
@ashcrow @cgwalters: FYI, servo maintains and utilizes their own fork of Homu you can use and submit pull requests to: https://github.com/servo/homu |
Fix privileges check fixes barosl#107 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/homu/108) <!-- Reviewable:end -->
No description provided.