twisted / treq

Python requests like API built on top of Twisted's HTTP client.
Other
587 stars 139 forks source link

Fix Sphinx warning about "request" cross-reference #322

Open twm opened 3 years ago

twm commented 3 years ago

Sphinx, as run by tox -e docs, generates this warning:

/home/runner/work/treq/treq/docs/api.rst:80: WARNING: more than one target found for cross-reference 'request': treq.request, treq.client.HTTPClient.request, treq.testing.treq.testing.StubTreq.request, treq.testing.RequestTraversalAgent.request

This warning disappears if line 70 of docs/api.rst is deleted (note that this is not the same line the warning is reported on!):

    :ivar request: See :attr:`IResponse.request <twisted.web.iweb.IResponse.request>`

The warning seems to originate in the :ivar request: bit. Removing the :attr: reference doesn't fix it.

Once this has been resolved, configure Sphinx to fail on warnings as Adi suggests.