Suggestion: Improve code snippet readability in documentation for easier copy-paste
- Dominant language
- Python
- Stars
- 8.8k
- Forks
- 359
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Hi,
I wanted to suggest an improvement to the documentation format gently. While the `.. testcode::` blocks are great for testing examples, they present two minor friction points for new users:
1. **Readability**
The indented code blocks without syntax highlighting make it harder to scan/understand examples quickly
2. **Copy-Paste Experience**
When copying code directly from GitHub's rendered documentation:
- The extra indentation requires manual adjustment
- Hidden `.. testoutput::` blocks can accidentally get copied
Would you consider either:
- Adding triple-backtick (```python) code fences alongside testcode blocks
- Including a "Copy to Clipboard" button via Sphinx extensions ([like this one](https://sphinx-copybutton.readthedocs.io/))
- Adjusting indentation levels for better copy-paste ability
This would make it even easier for folks to:
1. Quickly try examples from the docs
2. Experiment with Tenacity's awesome features
3. Adopt best practices faster
I'm happy to help submit a PR if this aligns with the project's direction! Just let me know what approach you'd prefer.
Thanks!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.