[PATCH V2] windows: eliminate win32 wildcard import

timeless timeless at gmail.com
Mon Aug 1 22:38:32 CDT 2011


At the risk of being flamed, I don't think excluding all files named
windows.py would be the right way to quiet the warnings. It seems
better to filter the output and drop all windows.py lines which
specifically mention unused imports (or even just add all the lines
the change lists - output is supposed to be stable and easy to
incorporate into the test file).

Sincerely,
The guy who was tricked into writing test-pyflakes

On 8/1/11, Matt Mackall <mpm at selenic.com> wrote:
> On Fri, 2011-07-29 at 00:43 +0200, Adrian Buehlmann wrote:
>> # HG changeset patch
>> # User Adrian Buehlmann <adrian at cadifra.com>
>> # Date 1311892767 -7200
>> # Node ID be22eaad6543e46c74da3d0e7a4be890a10f4701
>> # Parent  a5046880eca370a421f43e9ea5574793c382f86e
>> windows: eliminate win32 wildcard import
>>
>> diff --git a/mercurial/windows.py b/mercurial/windows.py
>> --- a/mercurial/windows.py
>> +++ b/mercurial/windows.py
>> @@ -9,6 +9,21 @@
>>  import osutil
>>  import errno, msvcrt, os, re, sys
>>
>> +from win32 import executablepath
>> +from win32 import getuser
>> +from win32 import hidewindow
>> +from win32 import lookupreg
>> +from win32 import makedir
>> +from win32 import nlinks
>> +from win32 import oslink
>> +from win32 import samedevice
>> +from win32 import samefile
>> +from win32 import setsignalhandler
>> +from win32 import spawndetached
>> +from win32 import termwidth
>> +from win32 import testpid
>> +from win32 import unlink
>
> FYI, this is now triggering spurious test errors in
> test-check-pyflakes.t because all of these are now imported but unused.
>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>

-- 
Sent from my mobile device


More information about the Mercurial-devel mailing list