Skip to content

Conversation

@sonnyding1
Copy link

This PR solves the problem in pytorch/tutorials#3619. In the "Learning PyTorch with Examples" tutorial, the autograd code block started with rimport, where it should be import. This happened because the custom includenodoc directive didn't include the r as part of a raw docstring like

r"""
PyTorch: Tensors and autograd
...
"""

@meta-cla meta-cla bot added the cla signed label Oct 28, 2025
@svekars
Copy link
Contributor

svekars commented Oct 28, 2025

Thank you! Did you test this?

@sonnyding1
Copy link
Author

Yes, I replaced the pytorch_sphinx_theme2 package in tutorials with my current branch, and it's parsing correctly now.

@svekars svekars merged commit 92dcace into pytorch:pytorch_sphinx_theme2 Oct 29, 2025
1 check passed
@sonnyding1 sonnyding1 deleted the includenodoc_raw_docstring branch October 29, 2025 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants