# PEP8

**URL:** <https://forum.ansible.com/t/pep8/13796>\
**Category:** Ansible Developer\
**Created:** [October 29, 2013, 8:59am UTC](https://forum.ansible.com/t/pep8/13796 "2013-10-29T08:59:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian\_Berendt](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@Christian\_Berendt](https://forum.ansible.com/u/Christian_Berendt)\
**Post date:** [October 29, 2013, 8:59am UTC](https://forum.ansible.com/t/pep8/13796/1 "2013-10-29T08:59:35Z")

</div>

What about PEP8 ([http://www.python.org/dev/peps/pep-0008/](http://www.python.org/dev/peps/pep-0008/))? There are a lot of style issues all over the sources. I would be willing to cleanup the sources.

Christian.

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [October 29, 2013, 12:12pm UTC](https://forum.ansible.com/t/pep8/13796/2 "2013-10-29T12:12:13Z")

</div>

I had a very short conversation with Michael about this a few days ago. PEP8 was specifically not made a requirement to reduce the barrier for contribution.

I am a big fan of pep8, and generally adhere to it strictly, and have done so with the code I have contributed.

However, I am hugely against updating code for the sole purpose of style changes. Updating code in this way, is terrible for things like blame.

In addition to that, a large percentage of the ~90 open pull requests would be broken and require refactoring, as they would no longer cleanly merge.

Almost every project I have ever worked with, discourages these types of code updates for specifically these reasons. If you are updating a small portion of code, that could benefit from style changes, do it then. Little by little the code style gets updated.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [October 29, 2013, 12:27pm UTC](https://forum.ansible.com/t/pep8/13796/3 "2013-10-29T12:27:18Z")

</div>

We have a “make pep8” target in the Makefile that we periodically use that ignores issues we do not care about but correct hundreds of others.

Generally pep8 is too strict in a few areas.

Please complain to me directly as opposed to this list if you disagree.

– Michael

---

<div class="post-metadata">

**Author:** ![Justin\_Lee](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@Justin\_Lee](https://forum.ansible.com/u/Justin_Lee)\
**Post date:** [January 30, 2015, 7:24pm UTC](https://forum.ansible.com/t/pep8/13796/4 "2015-01-30T19:24:03Z")

</div>

I usually PEP8 and apply style change only to the files I’m working on. So usually just one file. Is that permissible?

Justin
