473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

pylint: don't warn about tabs

I am brand new to pylint.
As a tab user, I want the tabs warning turned off.
How?

Larger question:
where is the config file format documented?

Thanks,
Alan Isaac

PS This is a wonderful tool.
Mar 8 '07 #1
16 10010
Alan Isaac wrote:
I am brand new to pylint.
As a tab user, I want the tabs warning turned off.
How?
Advice: Don't. IIRC it's planned in future Python versions that TABs
aren't supported for indentation.

Regards,
Björn

--
BOFH excuse #401:

Sales staff sold a product we don't offer.

Mar 8 '07 #2
Bjoern Schliessmann <us**************************@spamgourmet.comwrite s:
Alan Isaac wrote:
As a tab user, I want the tabs warning turned off.

Advice: Don't.
Agreed. Sticking to spaces for indentation avoids the ambiguity of
interpretation that ASCII TAB characters are subject to. In addition,
PEP 8 (which many people consider a strong suggestion for a style
guide for all Python code) recommends four space characters for
indentation.
IIRC it's planned in future Python versions that TABs aren't
supported for indentation.
I've not seen such plans, can you support that?

If you're thinking of this post from Guido, please note the date it
was made:

<URL:http://www.artima.com/weblogs/viewpost.jsp?thread=101968>

--
\ "Dvorak users of the world flgkd!" -- Kirsten Chevalier, |
`\ rec.humor.oracle.d |
_o__) |
Ben Finney

Mar 8 '07 #3
Alan Isaac wrote:
I am brand new to pylint.
As a tab user, I want the tabs warning turned off.
How?

Larger question:
where is the config file format documented?
doc/features.txt
examples/pylintrc

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Mar 8 '07 #4
Ben Finney wrote:
Bjoern Schliessmann <us**************************@spamgourmet.com>
>IIRC it's planned in future Python versions that TABs aren't
supported for indentation.

I've not seen such plans, can you support that?
No ... 8)
If you're thinking of this post from Guido, please note the date
it was made:
Not this one; I thought that if there was a warning added about tabs
as whitespace recently, tabs will become forbidden in the future.

(That is not True, obviously ;) )

Anyway, thanks for correction.

Regards,
Björn

--
BOFH excuse #164:

root rot

Mar 8 '07 #5
En Thu, 08 Mar 2007 14:33:38 -0300, Bjoern Schliessmann
<us**************************@spamgourmet.comescri bió:
Alan Isaac wrote:
>As a tab user, I want the tabs warning turned off.

Advice: Don't. IIRC it's planned in future Python versions that TABs
aren't supported for indentation.
AFAIK, using tabs xor spaces will be ok, but not MIXING them.

--
Gabriel Genellina

Mar 8 '07 #6
Ben Finney wrote:
Bjoern Schliessmann <us**************************@spamgourmet.comwrite s:
>Alan Isaac wrote:
>>As a tab user, I want the tabs warning turned off.
Advice: Don't.

Agreed. Sticking to spaces for indentation avoids the ambiguity of
interpretation that ASCII TAB characters are subject to. In addition,
PEP 8 (which many people consider a strong suggestion for a style
guide for all Python code) recommends four space characters for
indentation.
For those who prefer say 3 or 8, pylint permits this to be specified in
the configuration file.

Colin W.
>
>IIRC it's planned in future Python versions that TABs aren't
supported for indentation.

I've not seen such plans, can you support that?

If you're thinking of this post from Guido, please note the date it
was made:

<URL:http://www.artima.com/weblogs/viewpost.jsp?thread=101968>
Mar 9 '07 #7
"Ben Finney" <bi****************@benfinney.id.auwrote in message
news:ma***************************************@pyt hon.org...
Sticking to spaces for indentation avoids the ambiguity of
interpretation that ASCII TAB characters are subject to.
What ambiguity?
Tabs are *less* ambiguous.
One tab character is one level of indentation.
I have never seen this violated.

Users of spaces cannot even count
on shared code being 4 rather than 8 spaces.

Even though tabs when on this score, face it,
in the end it is pure preference. There is no
"right" answer (even for emacs users). ;-)

And my actual question remains unanswered...

Alan Isaac
Mar 9 '07 #8
Alan Isaac wrote:
I am brand new to pylint.
As a tab user, I want the tabs warning turned off.
"Robert Kern" <ro*********@gmail.comwrote in message
news:ma***************************************@pyt hon.org...
doc/features.txt
examples/pylintrc
The example is very helpful.
Thanks!
Alan
Mar 9 '07 #9

Alan"Ben Finney" <bi****************@benfinney.id.auwrote in message
Alannews:ma*************************************** @python.org...
>Sticking to spaces for indentation avoids the ambiguity of
interpretation that ASCII TAB characters are subject to.
AlanWhat ambiguity?
AlanTabs are *less* ambiguous.
AlanOne tab character is one level of indentation.
AlanI have never seen this violated.

The ambiguity comes when eventually your source is edited by someone else.
Perhaps you have the discipline to use only spaces or only tabs, but the guy
in the next cubicle is as likely to use spaces as you are to use tabs. Once
he edits a file the two of you share, you're toast.

This is not a new topic. After a lot of discussion over the years the
general consensus in the Python community is that spaces are the only way to
go. Here are some references:

http://www.python.org/dev/peps/pep-0666/
http://mail.python.org/pipermail/pyt...ry/183758.html
http://wiki.w4py.org/spaces-not-tabs.html

The Python distribution even comes with two scripts, tabnanny and reindent,
which were developed to detect and eliminate the ambiguity caused by mixing
spaces and tabs. The beginning of the reindent doc string reads:

Change Python (.py) files to use 4-space indents and no hard tab
characters. Also trim excess spaces and tabs from ends of lines, and
remove empty lines at the end of files. Also ensure the last line ends
with a newline.

If only tabs were considered to be a viable alternative to only spaces,
reindent would almost certainly have grown a flag by now to allow that.

The tag line for tabnanny reads:

The Tab Nanny despises ambiguous indentation. She knows no mercy.

Finally, note this from PEP 666:

The problem is that there is no polite way to say 'Stop wasting your
valuable time and mine.'

That's as politely as I can put it.

Skip
Mar 10 '07 #10
On Fri, 9 Mar 2007, sk**@pobox.com apparently wrote:
Finally, note this from PEP 666:
The problem is that there is no polite way to say
'Stop wasting your valuable time and mine.'
That's as politely as I can put it.


I really think you should reread the PEP, which is making

the opposite of your point.

Cheers,

Alan
Mar 10 '07 #11
Alan Isaac wrote:
What ambiguity?
Tabs are *less* ambiguous.
One tab character is one level of indentation.

I have never seen this violated.
Not quite a proof ...
Users of spaces cannot even count
on shared code being 4 rather than 8 spaces.
You also can't count on proper TAB code.
Even though tabs when on this score, face it,
in the end it is pure preference. There is no
"right" answer (even for emacs users). ;-)
ACK.
And my actual question remains unanswered...
(--indent-string or changing a config file doesn't work for you? I
have the impression it was answered.)

Regards,
Björn

--
BOFH excuse #364:

Sand fleas eating the Internet cables

Mar 10 '07 #12
>Finally, note this from PEP 666:

AlanI really think you should reread the PEP, which is making
Alanthe opposite of your point.

Quite the opposite, in fact. Laura Creighton wrote that PEP precisely with
the expectation (and hope) that Guido would reject it, which he did:

PEP: 666
Title: Reject Foolish Indentation
Version: 1083
Last-Modified: 2001-12-12 00:40:09 +0100 (Wed, 12 Dec 2001)
Author: Laura Creighton <lac at strakt.com>
Status: Rejected
Type: Standards Track
Created: 3-Dec-2001
Python-Version: 2.2
Post-History: 5-Dec-2001

Note the title and status.

Skip
Mar 10 '07 #13
Gabriel Genellina wrote:
En Thu, 08 Mar 2007 14:33:38 -0300, Bjoern Schliessmann
<us**************************@spamgourmet.comescri bió:
>Alan Isaac wrote:
>>As a tab user, I want the tabs warning turned off.


Advice: Don't. IIRC it's planned in future Python versions that TABs
aren't supported for indentation.


AFAIK, using tabs xor spaces will be ok, but not MIXING them.
That's what should be enforced. For any module, whitespace
at the beginnings of lines should be all spaces or all tabs.
Both are unambiguous and can be mechanically converted to each
other. But if spaces and tabs are mixed, there's ambiguity.

John Nagle
Mar 10 '07 #14
sk**@pobox.com wrote:
http://www.python.org/dev/peps/pep-0666/
In pep-0666, Laura Creighton wrote:
People who mix tabs and spaces, naturally, will find that their
programs do not run. Alas, we haven't found a way to give them an
electric shock as from a cattle prod remotely. (Though if somebody
finds out a way to do this, I will be pleased to add this option to
the PEP.)
Fortunately, since the PEP was last edited in 2001, there has been progress
on this front with the advent of the Microsoft WE-SYP programme. (see
http://www.youtube.com/watch?v=M-c0YSsF_O0 ). We should find out whether
the technology can be licensed for use in a future release of Python.
Mar 10 '07 #15
Alan:
>I really think you should reread the PEP, which is making
the opposite of your point.
Skip:
Quite the opposite, in fact. Laura Creighton wrote that
PEP precisely with the expectation (and hope) that Guido
would reject it, which he did: Note the title and status.
Sorry Skip, but this is really just a matter of taking off
your blinkers and learning to read. As you say, note the
title and status. Or alternatively, read this from the PEP:

I figure if I make this PEP, we can then ask Guido
to quickly reject it, and then when this argument
next starts up again, we can say 'Guido isn't
changing things to suit the tab-haters or the
only-tabbers, so this conversation is a waste of
time.'

Alan Isaac

Mar 10 '07 #16
Alan:
>my actual question remains unanswered...
Bjoern:
--indent-string or changing a config file doesn't work for you?
Works great. (I read Robert's message subsequent to that
complaint.) And pylint is wonderful.

Alan Isaac
Mar 10 '07 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Michael Yanowitz | last post by:
Hello: I ran the new pylint and my code and I had a few questions on why those are warnings or what I can do to fix them: 1) W: 0: Too many lines in module (1587) Why is 1587 considered too...
5
by: Tuomas | last post by:
#!/usr/bin/python """test pydev_0.9.3/../pylint""" __revision__ = "test_mod 0.1 by TV 06/10/22" lst = lst = map(lambda x: x.strip(), lst) result = """ No config file found, using default...
7
by: montyphyton | last post by:
Some recent posts about Python programming style got me thinking. Since we have the PEP 8 which gives some guidelines about the style to be used, do we have any program that can check for...
2
by: lgfang | last post by:
Hi, I think this is a bug of pylint.el. But I failed finding a way to submit the bug neither in its official site nor in google. So I post it here wishing it may be useful for some buddies. ...
2
by: Mick Charles Beaver | last post by:
Hello, I've been looking into using PyLint on some of my programs, just as a best practices kind of thing. Here's a snippet:...
0
by: KLEIN Stephane | last post by:
Hi, I wonder if pychecker projet is dead ? On pychecker home page (http://pychecker.sourceforge.net/), last version date from February 3, 2006 and their mailist contain spam messages only. ...
2
by: dmitrey | last post by:
Hi all, I have Eric 4.1.1, pylint and Eric pylint plugin installed, but I cannot find how to use pylint from Eric IDE GUI. Does anyone know? Thank you in advance, D.
1
by: Diez B. Roggisch | last post by:
Which version of python-logilab-common and python-logilab-astng are By now, pylint 0.14 with logilab.common 0.27 and astng 0.17.2 I was able to track down the problem as being related to a...
2
by: GHUM | last post by:
Hello, I am pylinting some software of mine. Now pylint throws messages, and I know of pylint --help-msg to get some more text. What is missing out are explanation, WHY some things are bad,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.