Re: [Epydoc-devel] how to document methods imported from other modules?
Brought to you by:
edloper
|
From: Paul P. <pog...@gm...> - 2007-06-27 18:26:58
|
Edward Loper wrote:
> On Jun 24, 2007, at 2:43 PM, Paul Pogonyshev wrote:
> > Hi,
> >
> > My package supports Python 2.3 onwards. However, I do provide some
> > methods that are only available on 2.5. [...]
> > Question is: can I somehow pretend that my_cool_context_manager() is
> > defined with Main class, so it is documented in that class?
>
> The problem here is that epydoc's source code parser sees the import
> statement for my_cool_context_manager, so naturally it assumes that's
> an imported object that should be documented elsewhere. [...]
Actually, this seems to trick Epydoc into not seeing the importing:
import _helper_2_5
my_cool_context_manager = _helper_2_5.my_cool_context_manager
I get my_cool_context_manager documented in the target module, not in
the helper. Now I simply disable documenting helper modules in my
script that invokes Epydoc and all looks correct.
However, there appears to be another problem... If I document the
attached module, I get
Method Details
object_context_manager(*args, **kwds)
Instead of object_context_manager(self), which would be more logical.
Is that a known problem?
Paul
|