Open leandrodesouzadev opened 11 months ago
I haven't touched on the changes.rst
file. I wasn't quite sure if it's required for this type of change.
I'm not quite sure how to resolve this lint error. Can anyone give me a hint?
@leandrodesouzadev The automatically generated documentation for panels (https://django-debug-toolbar.readthedocs.io/en/latest/panels.html#debug_toolbar.panels.Panel) will contain a reference to your new GetResponse
stub. The stub itself isn't documented however, so Sphinx doesn't know where GetResponse
should point to.
Something like this fixes it:
diff --git a/docs/panels.rst b/docs/panels.rst
index db4e9311..f2fe35c0 100644
--- a/docs/panels.rst
+++ b/docs/panels.rst
@@ -352,6 +352,8 @@ There is no public CSS API at this time.
.. automethod:: debug_toolbar.panels.Panel.run_checks
+.. autoclass:: debug_toolbar._stubs.GetResponse
+
.. _javascript-api:
JavaScript API
I'm not sure if that's what we want. Maybe there's a different way to specify the type which doesn't require the GetResponse
class to be documented as well? Or maybe documenting the stub itself (as a temporary measure, until Django ships type hints?) would be the way to go?
Will definitely take a look into it
Description
This PR adds type hints to the
middleware
andtoolbar
modulesFixes #1705
Checklist:
docs/changes.rst
.