Embedded doc mode using HTML comments to fix attribute order issues (fixes #5269)#5288
Embedded doc mode using HTML comments to fix attribute order issues (fixes #5269)#5288
Conversation
|
Thanks, the idea to use markdown comments here is nice! I guess the drawback is that this way around, unlike #5283, the comments can silently be wrong (e.g. typo) and the user will not be notified of their error. Is there any way we could improve that? I think with #5283 we could solve the ordering issue by making the Both approaches look viable, I guess we can keep refining and eventually we'll figure out what feels best 👍 |
b0b9ca4 to
dbdf63f
Compare
|
Redesigning the macros is a good idea, but we need to handle the property chain order, which may require careful design🤔
|
This PR proposes an alternative implementation for the doc mode feature discussed in #5269 and prototyped in #5283.
Core Ideas:
<!-- pyo3_doc_mode: python -->.python,rust,both(default).Advantages:
Changes are primarily in
pyo3-macros-backend/src/utils.rs(updatedget_docfunction) andattributes.rs.Full code diffs below. Feedback welcome—happy to iterate!
Fixes #5269





References #5283