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: 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: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 Roy Smith wrote: > In article , > 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 ;)