Patchwork [12,of,12,topics] flake8: fix E124 style

login
register
mail settings
Submitter Sean Farley
Date Aug. 31, 2016, 3:58 a.m.
Message ID <c0064f048058b35713d7.1472615898@laptop.local>
Download mbox | patch
Permalink /patch/16511/
State Accepted
Headers show

Comments

Sean Farley - Aug. 31, 2016, 3:58 a.m.
# HG changeset patch
# User Sean Farley <sean@farley.io>
# Date 1472595848 25200
#      Tue Aug 30 15:24:08 2016 -0700
# Node ID c0064f048058b35713d7262b578a7fa5e216f195
# Parent  b579ff9e41931a26ded12b409925d0fa40d9b05d
# EXP-Topic flake8
flake8: fix E124 style
Sean Farley - Aug. 31, 2016, 4:39 a.m.
Sean Farley <sean@farley.io> writes:

> # HG changeset patch
> # User Sean Farley <sean@farley.io>
> # Date 1472595848 25200
> #      Tue Aug 30 15:24:08 2016 -0700
> # Node ID c0064f048058b35713d7262b578a7fa5e216f195
> # Parent  b579ff9e41931a26ded12b409925d0fa40d9b05d
> # EXP-Topic flake8
> flake8: fix E124 style

This patch series is meant as a take-the-rules-you-want (so if you want
to keep ignoring E124, just drop this patch). I hope some are taken
because I like clean code.
Anton Shestakov - Aug. 31, 2016, 5:30 a.m.
On Tue, 30 Aug 2016 21:39:49 -0700
Sean Farley <sean@farley.io> wrote:

> Sean Farley <sean@farley.io> writes:
> 
> > # HG changeset patch
> > # User Sean Farley <sean@farley.io>
> > # Date 1472595848 25200
> > #      Tue Aug 30 15:24:08 2016 -0700
> > # Node ID c0064f048058b35713d7262b578a7fa5e216f195
> > # Parent  b579ff9e41931a26ded12b409925d0fa40d9b05d
> > # EXP-Topic flake8
> > flake8: fix E124 style  
> 
> This patch series is meant as a take-the-rules-you-want (so if you want
> to keep ignoring E124, just drop this patch). I hope some are taken
> because I like clean code.

For people curious about the current state of the code, here's the
actual flake8 report for topics:

https://candolint.dwimlabs.net/www.mercurial-scm.org/repo/topic-experiment/1#l53

I also like clean code, looking forward to seeing these patches land.
Pierre-Yves David - Sept. 6, 2016, 11:47 a.m.
On 08/31/2016 05:58 AM, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean@farley.io>
> # Date 1472595848 25200
> #      Tue Aug 30 15:24:08 2016 -0700
> # Node ID c0064f048058b35713d7262b578a7fa5e216f195
> # Parent  b579ff9e41931a26ded12b409925d0fa40d9b05d
> # EXP-Topic flake8
> flake8: fix E124 style

I'm not sure this match our usual coding style (but that's interesting)
Pierre-Yves David - Sept. 6, 2016, 11:48 a.m.
On 08/31/2016 06:39 AM, Sean Farley wrote:
> Sean Farley <sean@farley.io> writes:
>
>> # HG changeset patch
>> # User Sean Farley <sean@farley.io>
>> # Date 1472595848 25200
>> #      Tue Aug 30 15:24:08 2016 -0700
>> # Node ID c0064f048058b35713d7262b578a7fa5e216f195
>> # Parent  b579ff9e41931a26ded12b409925d0fa40d9b05d
>> # EXP-Topic flake8
>> flake8: fix E124 style
>
> This patch series is meant as a take-the-rules-you-want (so if you want
> to keep ignoring E124, just drop this patch). I hope some are taken
> because I like clean code.

I've taken fix for: E713, E301, E111, E222, W391, E127 see for the other.

Thanks!

Patch

diff --git a/hgext3rd/topic/__init__.py b/hgext3rd/topic/__init__.py
--- a/hgext3rd/topic/__init__.py
+++ b/hgext3rd/topic/__init__.py
@@ -42,28 +42,29 @@  from . import (
     discovery,
 )
 
 cmdtable = {}
 command = cmdutil.command(cmdtable)
-colortable = {'topic.active': 'green',
-              'topic.list.troubledcount': 'red',
-              'topic.list.headcount.multiple': 'yellow',
-              'topic.list.behindcount': 'cyan',
-              'topic.list.behinderror': 'red',
-              'topic.stack.index': 'yellow',
-              'topic.stack.index.base': 'none dim',
-              'topic.stack.desc.base': 'none dim',
-              'topic.stack.state.base': 'dim',
-              'topic.stack.state.clean': 'green',
-              'topic.stack.index.current': 'cyan',       # random pick
-              'topic.stack.state.current': 'cyan bold',  # random pick
-              'topic.stack.desc.current': 'cyan',        # random pick
-              'topic.stack.state.unstable': 'red',
-              'topic.stack.summary.behindcount': 'cyan',
-              'topic.stack.summary.behinderror': 'red',
-              'topic.stack.summary.headcount.multiple': 'yellow',
-             }
+colortable = {
+    'topic.active': 'green',
+    'topic.list.troubledcount': 'red',
+    'topic.list.headcount.multiple': 'yellow',
+    'topic.list.behindcount': 'cyan',
+    'topic.list.behinderror': 'red',
+    'topic.stack.index': 'yellow',
+    'topic.stack.index.base': 'none dim',
+    'topic.stack.desc.base': 'none dim',
+    'topic.stack.state.base': 'dim',
+    'topic.stack.state.clean': 'green',
+    'topic.stack.index.current': 'cyan',       # random pick
+    'topic.stack.state.current': 'cyan bold',  # random pick
+    'topic.stack.desc.current': 'cyan',        # random pick
+    'topic.stack.state.unstable': 'red',
+    'topic.stack.summary.behindcount': 'cyan',
+    'topic.stack.summary.behinderror': 'red',
+    'topic.stack.summary.headcount.multiple': 'yellow',
+}
 
 testedwith = '3.9'
 
 def _contexttopic(self):
     return self.extra().get(constants.extrakey, '')
diff --git a/setup.cfg b/setup.cfg
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,2 +1,2 @@ 
 [flake8]
-ignore = E261, E266, E302, E129, E731, E124
+ignore = E261, E266, E302, E129, E731