[PATCH 05 of 12 topics] flake8: fix W503 style

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Sep 6 11:30:02 UTC 2016



On 08/31/2016 07:23 PM, Sean Farley wrote:
> Augie Fackler <raf at durin42.com> writes:
>
>> On Tue, Aug 30, 2016 at 08:58:11PM -0700, Sean Farley wrote:
>>> # HG changeset patch
>>> # User Sean Farley <sean at farley.io>
>>> # Date 1472595240 25200
>>> #      Tue Aug 30 15:14:00 2016 -0700
>>> # Node ID 752a62b50ba31b768c52c6b423cd1a36d0c6eae2
>>> # Parent  8f1e18702ba107ffcb35be04dc8a1e650e5c1e7f
>>> # EXP-Topic flake8
>>> flake8: fix W503 style
>>>
>>> diff --git a/hgext3rd/topic/destination.py b/hgext3rd/topic/destination.py
>>> --- a/hgext3rd/topic/destination.py
>>> +++ b/hgext3rd/topic/destination.py
>>> @@ -72,12 +72,12 @@ def _destupdatetopic(repo, clean, check)
>>>      if bookmarks.isactivewdirparent(repo):
>>>          movemark = repo['.'].node()
>>>      return node, movemark, None
>>>
>>>  def desthistedit(orig, ui, repo):
>>> -    if not (ui.config('histedit', 'defaultrev', None) is None
>>> -            and repo.currenttopic):
>>> +    if not (ui.config('histedit', 'defaultrev', None) is None and
>>> +            repo.currenttopic):
>>
>> I know I intentionally put the binary operator at the start of the subsequent line because then it's less ambiguous when visually parsing, eg:
>>
>> if (foo
>>     and bar):
>>     baz
>>
>> leaves it more visually obvious where the body of the if statement begins than
>>
>> if (foo and
>>     bar):
>>     baz
>>
>> I'm not sure how others feel.
>
> I could take or leave this one.

I'm also not fan of that change, (cf Augie point), let's drop this one.

Cheers,

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list