Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #69866

Re: change spacing to two instead of four with pep8 or flake8?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'modify': 0.07; 'subject:two': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'spaces': 0.09; 'hardcoded': 0.16; 'ignoring': 0.16; 'pep8': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'roy': 0.16; 'spacing': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'possible,': 0.19; 'slightly': 0.19; 'header:User- Agent:1': 0.23; 'source': 0.25; 'header:X-Complaints-To:1': 0.27; 'indentation': 0.31; 'subject:with': 0.35; 'but': 0.35; 'there': 0.35; 'yield': 0.36; 'subject:?': 0.36; 'two': 0.37; 'problems': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'catch': 0.60; 'course.': 0.60; 'more': 0.64; 'life': 0.66; 'smith': 0.68; 'article': 0.77; 'obvious.': 0.84; 'otten': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Peter Otten <__peter__@web.de>
Subject Re: change spacing to two instead of four with pep8 or flake8?
Date Tue, 08 Apr 2014 16:06:44 +0200
Organization None
References <CANqRL=RBbfXJMFyV8w7J8Sdf+bRccOhK4kU6e60q1XcBX8GqSQ@mail.gmail.com> <mailman.9010.1396961763.18130.python-list@python.org> <roy-1740F4.09202908042014@news.panix.com>
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Gmane-NNTP-Posting-Host p57bd9597.dip0.t-ipconnect.de
User-Agent KNode/4.11.5
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.9014.1396966019.18130.python-list@python.org> (permalink)
Lines 29
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1396966019 news.xs4all.nl 2952 [2001:888:2000:d::a6]:40102
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:69866

Show key headers only | View raw


Roy Smith wrote:

> In article <mailman.9010.1396961763.18130.python-list@python.org>,
>  Peter Otten <__peter__@web.de> wrote:
> 
>> Dennis wrote:
>> 
>> > In Pylint you can change the spacing multiplier from 4 spaces to two
>> > in its pylintrc, but for the life of me I cannot find a way to do this
>> > with the flake8 / pep8 utilities.
>> > 
>> > I want to avoid ignoring E111 altogether if at all possible, because
>> > it may catch other spacing problems that are not as obvious.
>> > 
>> > hacky/non-hacky solutions welcome of course.
>> 
>> The check is hardcoded
>> 
>>     if indent_char == ' ' and indent_level % 4:
>>         yield 0, "E111 indentation is not a multiple of four"
>> 
>> so your only short-term solution is to modify the script's source code.
> 
> There's always monkey-patching :-)

There is always a way to achieve roughly the same that takes more time and 
is slightly harder to get right ;)

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: change spacing to two instead of four with pep8 or flake8? Peter Otten <__peter__@web.de> - 2014-04-08 14:55 +0200
  Re: change spacing to two instead of four with pep8 or flake8? Roy Smith <roy@panix.com> - 2014-04-08 09:20 -0400
    Re: change spacing to two instead of four with pep8 or flake8? Peter Otten <__peter__@web.de> - 2014-04-08 16:06 +0200

csiph-web