Hey, Our CI system runs pep8 and pyflakes separately on every commit
as well and it's been something I've wanted to work on cleaning up
since I discovered it. However, v2.0 has made it harder for me since
time has become more of a premium so your help would be welcome.
Not everyone here is onboard with all of the pep8 style suggestions
(the one I hear most frequently is 80 column lines) so i think the
best thing to do is probably take individual (or a small number) of
flake8 warnings and work on fixing those throughout the code base (can
be one or several pull requests depending on how you best work) and
then move on to the next one. That way you'll know that everyone
here is fine with that particular style change before you spend time
fixing the code for it.
Glancing briefly at current pep8 warnings, I see that four space
indent and mixing tabs and spaces are probably low hanging fruit that
would get the numbers down and make it easier to see what else needs
fixing.
Spaces around operators, brackets, braces, and parenthesis probably
should be submitted separately from indentation but also affects many
files.
Deprecations (like .has_key()) should be acceptable to everyone.
multiple statements on one line is a personal pet peeve of mine but
there's not too many of those.
pyflakes shows somethings that are actual errors that need fixing
(undefined name errors - although many of those are false positives
inside of modules. modules are currently concatenated with snippets of
generic code so some things are defined in the generic code).
If you have some personal favorite style bugs that you'd like to
concentrate on, mention them here so that we can get everyone on board
with the style fix and then you can get busy.
-Toshio
On Tue, Jul 28, 2015 at 5:47 AM, Fotis Gimian <
fgimian...@gmail.com> wrote:
> Hey there folks, as a Python developer myself, I was a bit surprised to see
> that the Ansible codebase doesn't follow Python PEP8 standards as per
>
https://www.python.org/dev/peps/pep-0008/
>
> Our team (and many other users) flake8
>
https://flake8.readthedocs.org/en/2.3.0/ for validating their code.
>
> With all the work going on with v2.0 to ensure better coding standards and
> such, I think it would be a perfect time to consider this also. I'd be
> happy to contribute style fixes if you are interested and to implement
> flake8 checking for your codebase.
>
> I think that 3rd party modules in the extras repo should also be requested
> to comply with PEP8 standards so that the codebase remains somewhat
> consistent and standards compliant.
>
> All the best and keep up the great work, I love Ansible!!
> Fotis
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
ansible-proje...@googlegroups.com.
> To post to this group, send email to
ansible...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/ansible-project/ce4f568f-05ba-4a83-a937-f8cf63a30ca9%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.