[Python-3000] problem with checking whitespace in svn pre-commit hook

Guido van Rossum guido at python.org
Thu Jun 7 20:16:41 CEST 2007


On 6/7/07, Neal Norwitz <nnorwitz at gmail.com> wrote:
> On 6/7/07, martin at v.loewis.de <martin at v.loewis.de> wrote:
> > > tokenize.TokenError: ('EOF in multi-line statement', (315, 0))
> >
> > I analyzed that a bit further, and found that
> > Lib/distutils/unixccompiler.py:214 reads
> >
> > if not isinstance(output_dir, (str, type(None)):
> >
> > This is a syntax error; a closing parenthesis is missing.
> > tokenize.py chokes at the EOF as the parentheses aren't balanced.
> >
> > > I ran reindent prior to committing, but that had no effect (ie,
> > > still go the error).
> >
> > I find that hard to believe - running reindent.py on the file
> > fails for me with Python 2.5 as well.
>
> I ran reindent with py3k, something like:  ./python
> Tools/scripts/reindent.py Lib
> IIRC.  I don't have the command line handy.  I'll fix this when I get
> home tonight.
>
> Has anyone tried the 3k reindent?  Or did I just screw that up?
http://mail.python.org/mailman/options/python-3000/guido%40python.org

The py3k reindent is just fine; you screwed up the closing paren on
line 214 in unixccompile.py. All versions of reindent that I can find
correctly complain about that. I'm curious how you managed to bypass
it! :-)

I've checked in the fix.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list