On Mon, Jan 12, 2009 at 5:00 PM, Fabio Zadrozny <fabi...@gmail.com> wrote: >> in our code we sometimes use >> >> import apackage >> from some.other.place import foo >> >> and our apackage/__init__.py sets up import mechanisms and is required >> for proper functionality of following code. Now the problem is that >> PyDev thinks that this is unused import. >> >> Is there any way how to suppress this for that specific package? Or >> would it be reasonable to suppress this every time when __init__.py is >> non-trivial (non-empty)? > > The only way to suppress it right now would be putting an > #...@unusedimport on the place that's calling it. Suppressing it when > it's non-empty seems strange for me... > > Maybe there could be a way to say that uses of that module should not > be used, but in reality, I find that: > - that construct is used when you want to config some subpackage, so, > that import doesn't need to be explicit (it'll happen implicitly when > some subpackage is used)
Actually this is not the case. That's part of that trick inside the __init__.py > - when you want it for some side-effects that will usually affect a > factory or some other thing outside of the package (but then, having > an explicit comment such as #...@unusedimport will make much more clear > about your intentions, so, I think it's an advantage, not a > disadvantage). Well, I can check how happy are people with that. Thanks. -Radim > > Cheers, > > Fabio > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Pydev-users mailing list > Pydev-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pydev-users > ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Pydev-users mailing list Pydev-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pydev-users