[wingide-users] An idea for better auto-completion

Michael Foord fuzzyman at voidspace.org.uk
Tue Sep 5 12:05:02 MDT 2006


Vania Smrkovski wrote:
> To that point, while I know you guys have your hands full with IDE 
> feature sets already, it would be very nice to have a configurable 
> list of "best practice" checks and common gotchas, that would review 
> your code and point out areas of potential problems and code profilers 
> that check all user paths for potential exceptions and errors..  There 
> are many cases where I worry I may have missed something obvious.
At work we have PyLint integrated as part of our build process.

This checks for unused import statements, unused variables and use of 
undefined names.

It can be configured to check for a whole host of potential problems, 
including coding style checks.

Michael Foord
http://www.voidspace.org.uk/python/index.shtml

>
> On 9/5/06, *Michael Foord* <fuzzyman at voidspace.org.uk 
> <mailto:fuzzyman at voidspace.org.uk>> wrote:
>
>     Wingware Support wrote:
>     > On Tue, 5 Sep 2006, Russell Warren wrote:
>     >
>     >> Wing also "sees" code nested in 'if 0:' blocks so you don't
>     >> need the code to run even in __debug__ mode.
>     >>
>     >> My code is littered with stuff like this:
>     >>
>     >>   if 0: assert isinstance(foo, MyClass)   #for Wing
>     >>
>     >
>     > BTW, if you don't want the assert and don't need 'if 0' (usually
>     > only needed to avoid circular or unwanted imports to get at the
>     > class name) you can just say:
>     >
>     >   isinstance(foo, MyClass)
>     >
>     > That's the minimum hint that Wing needs for the type.
>     >
>     > We're hoping to add inferencing type through function/method args
>     > at some point.  It's a bit tricky to do well, but should greatly
>     > reduce the need for isinstance hints.
>     >
>     If you get type inferencing working, *please* consider releasing
>     it as a
>     separate tool for Python programmers to do minimal checking for
>     program
>     correctness.
>
>     There has been a lot of research into type inferencing in Python
>     of the
>     years (starkiller, Brett Cannon's thesis, Shedskin does type
>     inferencing, further back there was an experimental  Python to Perl
>     translator that did some type inferencing), but none of these have
>     resulted in usable tools for the programmer.
>
>     Being able to catch basic type errors at compile time would be great.
>
>     Michael Foord
>     http://www.voidspace.org.uk/python/index.shtml
>     <http://www.voidspace.org.uk/python/index.shtml>
>
>     > - Stephan
>     >
>     > _________________________________________________
>     > Wing IDE users list
>     > http://wingware.com/lists/wingide
>     >
>     >
>
>     _________________________________________________
>     Wing IDE users list
>     http://wingware.com/lists/wingide
>
>
> ------------------------------------------------------------------------
>
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide



More information about the wingide-users mailing list