[Zope3-Users] Utility for removing unneeded import statements

2007-06-05 Thread Hermann Himmelbauer
Hi, During development and especially refactoring, I'm often confronted with cleaning up import statements. Missing imports are reported by Python, however, unneeded imports are not. I don't know if unneded imports are a performance issue, nevertheless it probably makes sense to clean them up

Re: [Zope3-Users] Utility for removing unneeded import statements

2007-06-05 Thread Adam Groszer
Hello Hermann, Z3 has an importchecker: Import checker This utility finds unused imports in Python modules. Its output is grep-like and thus emacs-friendly. ... Althought pyflakes works for me better. http://www.divmod.org/projects/pyflakes Tuesday, June 5, 2007, 12:50:40 PM, you wrote:

Re: [Zope3-Users] RE: Blog naming proposal

2007-06-05 Thread Jegenye 2001 Bt (Miklós Prisznyák)
2007/6/4, Mark, Jonathan (Integic) [EMAIL PROTECTED]: A better name is Noiszzz Noize starts with a capital N, then a vowel, then a Z then another vowel. It is too close to the word Nazi for some English speakers. I am not saying that people who like the name Noize also like Nazis. I am just

RE: [Zope3-Users] Utility for removing unneeded import statements

2007-06-05 Thread Doyon, Jean-Francois
You may want to look into PyLint: http://www.logilab.org/857 Or PyChecker: http://pychecker.sourceforge.net/ I use PyLint through PyDev/Eclipse, and it's a godsend ... J.F. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hermann Himmelbauer Sent:

Re: [Zope3-Users] Utility for removing unneeded import statements

2007-06-05 Thread Martijn Pieters
On 6/5/07, Doyon, Jean-Francois [EMAIL PROTECTED] wrote: You may want to look into PyLint: http://www.logilab.org/857 Or PyChecker: http://pychecker.sourceforge.net/ Or use PyFlakes: http://www.divmod.org/projects/pyflakes which doesn't execute code (like PyChecker does). -- Martijn

Re: [Zope3-Users] Calling a view in a doc test

2007-06-05 Thread Florian Lindner
Am Montag, 4. Juni 2007 schrieb Marius Gedminas: On Mon, Jun 04, 2007 at 03:14:16PM +0200, Florian Lindner wrote: Hello, in a doctest I have an object which has a view registered. I want to call this view and test for the XML it returns. How can I call the view so that it is being

Re: [Zope3-Users] Utility for removing unneeded import statements

2007-06-05 Thread Marius Gedminas
On Tue, Jun 05, 2007 at 12:59:32PM +0200, Adam Groszer wrote: Tuesday, June 5, 2007, 12:50:40 PM, Hermann wrote: During development and especially refactoring, I'm often confronted with cleaning up import statements. Missing imports are reported by Python, however, unneeded imports are

Re[2]: [Zope3-Users] Utility for removing unneeded import statements

2007-06-05 Thread Adam Groszer
Hello Marius, Tuesday, June 5, 2007, 6:03:52 PM, you wrote: pyflakes doesn't handle imports that are used by doctests only, e.g.: ... Can the import checker in Z3 handle this? I don't think so. As I remember it did not find all unnecessary imports, that's why I switched to pyflakes. --

Re: [Zope3-Users] Calling a view in a doc test

2007-06-05 Thread Marius Gedminas
On Tue, Jun 05, 2007 at 04:49:37PM +0200, Florian Lindner wrote: Am Montag, 4. Juni 2007 schrieb Marius Gedminas: On Mon, Jun 04, 2007 at 03:14:16PM +0200, Florian Lindner wrote: in a doctest I have an object which has a view registered. I want to call this view and test for the XML it

Re: [Zope3-Users] Utility for removing unneeded import statements

2007-06-05 Thread Marius Gedminas
On Tue, Jun 05, 2007 at 06:10:36PM +0200, Adam Groszer wrote: Hello Marius, Tuesday, June 5, 2007, 6:03:52 PM, you wrote: pyflakes doesn't handle imports that are used by doctests only, e.g.: ... Can the import checker in Z3 handle this? I don't think so. As I remember it did not