Opened on 04/18/2016 at 12:30:56 PM

Closed on 04/19/2016 at 04:06:30 PM

#3952 closed change (fixed)

Fix whitespaces in Python code for compliance with PEP-8

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

Description (last modified by kvas)

Background

See #3949.

Based on our experiments we decided to ignore E309 and E501 and E125 when doing the automatic reformatting. The reasoning is:

  • E309 -- adding an empty line before the first method in a class (except for the cases when the class has a docstring, that's E301). The empty line seems redundant, especially in the cases when the class has only one method. The absence of the empty line is not reported by pep8, so there's no reason to insert it.
  • E501 -- breaking up long lines. At the moment autopep8 can't fix all long lines. Also, some of the fixes that it does actually make the code less readable and necessitate editing it by hand afterwards. To eliminate the prohibitive amount of manual work we choose to not fix the long lines for now.
  • E125 -- indentation of broken up lines. Fixing this leads to re-indentation of some code, which was originally PEP8-compliant, in a way that reduces readability.

What to change

Run autopep8 --ignore E309,E501,E125 on all Python code. Use pydiff to double check that the bytecode isn't changing.

Attachments (0)

Change History (29)

comment:1 Changed on 04/18/2016 at 12:31:39 PM by sebastian

  • Description modified (diff)

comment:2 Changed on 04/18/2016 at 12:37:42 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/jshydra/rev/311f73842602

comment:3 Changed on 04/18/2016 at 12:56:38 PM by kvas

  • Description modified (diff)

comment:4 Changed on 04/18/2016 at 01:04:38 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/buildtools/rev/3816c08c0f98

comment:5 Changed on 04/18/2016 at 03:48:14 PM by abpbot

comment:6 Changed on 04/18/2016 at 03:57:36 PM by abpbot

comment:7 Changed on 04/18/2016 at 04:09:27 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/cms/rev/407299178497

comment:8 Changed on 04/18/2016 at 04:22:21 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/abpbot/rev/5216edd0e5dc

comment:9 Changed on 04/18/2016 at 05:07:19 PM by abpbot

Some commit referencing this issue has landed:
https://hg.adblockplus.org/adblockplus/rev/4e9995b5d4e4

Last edited on 04/19/2016 at 01:05:35 PM by sebastian

comment:10 Changed on 04/18/2016 at 05:17:35 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/adblockplus/rev/a96e8e6c4028

comment:11 Changed on 04/18/2016 at 05:21:49 PM by abpbot

comment:12 Changed on 04/18/2016 at 05:24:48 PM by abpbot

comment:13 Changed on 04/18/2016 at 05:31:18 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/codingtools/rev/7a39b2713077

comment:14 Changed on 04/18/2016 at 05:36:35 PM by abpbot

comment:15 Changed on 04/18/2016 at 05:44:29 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/web.eyeo.com/rev/aea60d949a19

comment:16 Changed on 04/18/2016 at 05:46:25 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/web.adblockplus.org/rev/89a0fbadef0f

comment:17 Changed on 04/19/2016 at 11:35:14 AM by abpbot

comment:18 Changed on 04/19/2016 at 11:44:24 AM by abpbot

comment:19 Changed on 04/19/2016 at 01:16:35 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/abpcrawler/rev/0dca4afa16f0

comment:20 Changed on 04/19/2016 at 01:17:17 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/adblockplussafariios/rev/34f441dbfe1a

comment:21 Changed on 04/19/2016 at 01:23:42 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/libadblockplus/rev/1391ac4281c8

comment:22 Changed on 04/19/2016 at 01:26:21 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/adblockplusie/rev/09e80844bb0a

comment:23 Changed on 04/19/2016 at 01:29:59 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/adblockbrowser-build/rev/b9666e20ad20

comment:24 Changed on 04/19/2016 at 01:36:04 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/adblockbrowser/rev/084f575243cf

comment:25 Changed on 04/19/2016 at 03:29:24 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/elemhidehelper/rev/beb74833e35d

comment:26 Changed on 04/19/2016 at 03:30:15 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/abpwatcher/rev/116dd4a5b259

comment:27 Changed on 04/19/2016 at 03:30:38 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/abpcustomization/rev/90f3b1b16cf0

comment:28 Changed on 04/19/2016 at 03:31:28 PM by abpbot

A commit referencing this issue has landed:
https://hg.adblockplus.org/urlfixer/rev/90213fe3615c

comment:29 Changed on 04/19/2016 at 04:06:30 PM by sebastian

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

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