[IPython-dev] iplib.py is full of tabs
Fri Nov 9 14:15:20 CST 2007
On Nov 9, 2007 12:35 PM, Jörgen Stenarson <email@example.com> wrote:
> I just updated ipython and saw that iplib.py is full of tab
> indentations. It's been a week or two since I last updated so I don't
> know when it occured. Is this an intended change?
Most certainly not. In
This is just a set of simple guidelines aimed at ensuring that we all
spend our limited time on the code itself and not struggling with
patch management. Any comments on this are very much welcome (except
for any discussion on #1).
1. NEVER, EVER, EVER USE HARD TABS. USE 4 SPACES FOR INDENTATION.
I want to make sure that this one is as loudly and clearly
spelled out as possible. It is absolutely not open to discussion. I've
already had bugs creep in because of patches with hard tabs in them,
so in the future I'll simply reject any patch with a single tab in it.
IPython is indented (following python.org policy) with 4 spaces per
Brian, I'm afraid your editor is misconfigured. In this case, your
commit was the entire file:
Hopefully this can be cleaned up without too much hassle. Brian, it
might be a good idea for you to look at any other commits you've made
recently, since you may have introduced hard tabs elsewhere.
As a suggestion for the future (for all of us, this could happen to
anyone), *please* always look at the actual diff you're about to
commit before making the commit. Something quick like
svn diff | less
will spot this type of problem immediately, since you'll see a
multithousand-line diff instead of a small one.
I actually have this alias:
planck[IPython]> which svd
svd: aliased to svn diff | colordiff | less
That I use always before commits on any codebase. Colordiff is a
really handy little utility that syntax highlights diffs at the
command line, available for ubuntu with a simple apt-get install, and
probably trivial to install on any *nix-based box.
More information about the IPython-dev