Opened on 04/18/2016 at 09:51:38 AM

Closed on 04/19/2016 at 04:07:04 PM

#3949 closed change (fixed)

Change style guide for Python to be more compatible with PEP8

Reported by: kvas Assignee:
Priority: P3 Milestone:
Module: Unknown Keywords:
Cc: Blocked By: #3950, #3952
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by kvas)


Our style guide recommends 2 space indents for all code, including Python code. This is in contradiction to PEP8 recommendation. We would like to change the style guide to allow 4 space indents for Python (after which PEP8 would take over this aspect of formatting).

It would be undesirable to have a mixture of 2 space and 4 space indented code in our repositories, so this issue should also cover the reformatting of existing code. It doesn't have to happen immediately, but there should be a viable plan for how we get to a state where all our code is compliant with our style guide.

What to change

  • Update the style guide to allow 4 space indents for Python code.
  • Make all the Python code in our repositories consistently use 4 space indents (this doesn't include script, which is updated automatically and any repositories/files that don't originate at Eyeo and are not mostly developed by us).
  • While we're at it, also correct other style guide violations in existing code that can be autocorrected. After the change all errors reported by pep8 would also be violations of our guide.
  • When readability suffers from strict adherence to PEP8, preserve readability. Specifically for now lines that exceed 79 characters don't need to be changed (our experiments showed that corrections by autopep8 are not always possible in those cases and might decrease readability when they are).


Attachments (0)

Change History (4)

comment:1 Changed on 04/18/2016 at 09:52:42 AM by kvas

  • Description modified (diff)

comment:2 Changed on 04/18/2016 at 10:06:32 AM by kvas

  • Blocked By 3950 added

comment:3 Changed on 04/18/2016 at 12:30:56 PM by sebastian

  • Blocked By 3952 added

comment:4 Changed on 04/19/2016 at 04:07:04 PM by sebastian

  • Priority changed from Unknown to P3
  • Ready set
  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
Note: See TracTickets for help on using tickets.