You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Absolutely. Adding arbitrary attributes to the env object is ugly. Actually, the real "todo" extension uses a Domain component as a datastore. It can define methods for initialization, gathering contents, merging, and purging. To support parallel build, extension should support both merging and purging. So the Domain component is better to implement it, I think
timhoffm
added a commit
to timhoffm/matplotlib
that referenced
this issue
Apr 24, 2021
This uses a domain as data store for the redirects sphinx plugin.
That is how the sphinx todo extension handles data and was suggested in
sphinx-doc/sphinx#9003 (comment)
This uses a domain as data store for the redirects sphinx plugin.
That is how the sphinx todo extension handles data and was suggested in
sphinx-doc/sphinx#9003 (comment)
Limit documenting special members to __call__
Closesmatplotlib#20080.
Follow up to matplotlib#17151.
Problem
The approach to storing extension data is explained only vaguely.
From the env-merge-info description and
the todo extension tutorial I infer that one has to add arbitrary attributes to the
env
object.This doesn't look very clean. It risks breaking the object and one has to be careful that the data is already added (lots of
hasattr()
checks).Proposal
env.extension_data
and recommend extensions writing there.env-before-read-docs
the right place? I.e.The text was updated successfully, but these errors were encountered: