Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.031 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'subject:two': 0.07; 'skip:\\ 10': 0.09; 'spaces': 0.09; 'cc:addr:python-list': 0.11; "wouldn't": 0.14; '-tkc': 0.16; 'command-line': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'ignoring': 0.16; 'pep8': 0.16; 'rules.': 0.16; 'spacing': 0.16; 'followed': 0.16; 'weird': 0.16; 'ignore': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'possible,': 0.19; 'cc:addr:gmail.com': 0.22; 'otherwise,': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'cc:2**1': 0.23; 'align': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'that.': 0.31; 'enforce': 0.31; 'indentation': 0.31; 'option': 0.32; 'level.': 0.33; 'could': 0.34; 'subject:with': 0.35; 'agree': 0.35; 'something': 0.35; 'but': 0.35; 'doing': 0.36; 'next': 0.36; 'subject:?': 0.36; 'two': 0.37; 'expected': 0.38; 'problems': 0.38; 'generic': 0.38; 'expect': 0.39; 'catch': 0.60; 'numbers': 0.61; 'simply': 0.61; 'more': 0.64; 'skip:\xe2 10': 0.65; 'to:addr:gmail.com': 0.65; 'life': 0.66; '8bit%:21': 0.69; '8bit%:43': 0.74; 'goal': 0.75; '*really*': 0.84; 'it\xe2\x80\x99s': 0.84; 'obvious.': 0.84; 'received:50.22': 0.84; 'contents.': 0.91; 'don\xe2\x80\x99t': 0.91 Date: Tue, 8 Apr 2014 06:53:26 -0500 From: Tim Chase To: Chris =?UTF-8?B?4oCcS3dwb2xza2HigJ0=?= Warrick Subject: Re: change spacing to two instead of four with pep8 or flake8? In-Reply-To: References: X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Get-Message-Sender-Via: boston.accountservergroup.com: authenticated_id: tim@thechases.com Cc: python-list X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 38 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1396958011 news.xs4all.nl 2905 [2001:888:2000:d::a6]:55352 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:69854 On 2014-04-08 09:52, Chris =E2=80=9CKwpolska=E2=80=9D Warrick wrote: > On Tue, Apr 8, 2014 at 5:06 AM, 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. >=20 > You are trying to use tools that enforce a set of rules, one of > which is =E2=80=9Cuse 4 spaces per indentation level=E2=80=9D. If you do= n=E2=80=99t agree > with this rule, simply don=E2=80=99t use tools that enforce these rules. > It=E2=80=99s that easy. >=20 > But note, that E111 is =E2=80=9Cindentation is not a multiple of four=E2= =80=9D. > Which you are never going to listen to anyways if you want 2 spaces > per indentation level. If you *really* want to do 2 spaces (and > look weird), then just ignore that. It sounds like the OP wants a "indentation is not a multiple of N" error/warning which would be a more generic (and as you state, look weird doing so). I wouldn't expect pep8 to do it, since its goal is to align with pep8. But I could see some of the other checkers having a command-line option to set the expected indentation. Otherwise, one might just do something like sed -n '/^\( \)*\