-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 10.02.2010 15:01, schrieb Daniele Varrazzo: > Hello, > > I am writing documentation for Psycopg (yay!) using Sphinx and I have > a problem with links between methods in the same class. > >>From Sphinx documentation [1] I read that i can refer to methods in > the same class using the :meth: role without specifying the class > name. I see the feature used e.g. in the Python doc for Thread.join() > [2], where references :meth:`isAlive` are converted in a link. > > I tried to use the feature, but no link is created: for instance in > [3] I tried to use :meth:`fetchmany` but no link is created, unless I > use explicitely :meth:`cursor.fetchmany`. :meth:`.fetchmany`doesn't > work either. No warning is issued either. > > Can you explain why is this happening? I'm using Sphinx 0.6.4 with a > conf script mostly generated by sphinx-quickstart.
Turns out that this is because there is no current module set. Add .. currentmodule:: whatever before the class directive and it should work. (I'll still investigate that bug.) > Shouldn't a warning be issued when using cross reference rules and the > target object is not found? No -- at least not for Python objects, by default. Often times objects are referenced that are not documented, or not documented well, etc. You will get warnings e.g. for sections (:ref:), citations, tokens and a few other reference types. However, I can imagine switching on a mode where these warnings are emitted with a flag. cheers, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iEYEARECAAYFAkuBpUEACgkQN9GcIYhpnLDFhQCff8H7UDiILhakntk/LFyxL1HU A6IAn10w8rEJUvzwyhkLHY2F//fRUMot =DsRC -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
