Title: Add prek hook to forbid double backticks in docstrings · Issue #1822 · usethis-python/usethis-python · GitHub
Open Graph Title: Add prek hook to forbid double backticks in docstrings · Issue #1822 · usethis-python/usethis-python
X Title: Add prek hook to forbid double backticks in docstrings · Issue #1822 · usethis-python/usethis-python
Description: Problem Agents (and developers) sometimes write Python docstrings using RST double-backtick markup (e.g. install_requires) when single backticks should be used instead. This was caught in code review on PR #1795. Double backticks are RST...
Open Graph Description: Problem Agents (and developers) sometimes write Python docstrings using RST double-backtick markup (e.g. install_requires) when single backticks should be used instead. This was caught in code revi...
X Description: Problem Agents (and developers) sometimes write Python docstrings using RST double-backtick markup (e.g. install_requires) when single backticks should be used instead. This was caught in code revi...
Opengraph URL: https://github.com/usethis-python/usethis-python/issues/1822
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add prek hook to forbid double backticks in docstrings","articleBody":"## Problem\n\nAgents (and developers) sometimes write Python docstrings using RST double-backtick markup (e.g. ``install_requires``) when single backticks should be used instead. This was caught in code review on PR #1795.\n\nDouble backticks are RST-style code spans, but this project does not use RST-rendered docstrings. Single backticks are preferred for inline code references in docstrings.\n\n## Solution\n\nAdd a bespoke prek hook that scans Python files and fails if any docstring lines contain ````...```` (double backtick patterns).\n\n- The hook should be a CLI script accepting a list of files\n- It should parse Python files and check only docstring content (not code)\n- Should report file/line/column of violations\n- Example pattern to forbid: ````foo````\n\n## Agent Skill Update\n\nUpdate the relevant agent skills (e.g. `usethis-python-code`) to explicitly note: do NOT use double backticks in docstrings. Use single backticks for inline code references.","author":{"url":"https://github.com/nathanjmcdougall","@type":"Person","name":"nathanjmcdougall"},"datePublished":"2026-04-06T18:53:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1822/usethis-python/issues/1822"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ee16bafb-a263-85b8-8123-ccfbdec627a6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D726:2D2253:1D35D55:2A08D6B:6A4CE7B1 |
| html-safe-nonce | 5ff4701edb662bc668e73692ed7f32118dbb456621e04bfb3ebc5d9223947e5c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzI2OjJEMjI1MzoxRDM1RDU1OjJBMDhENkI6NkE0Q0U3QjEiLCJ2aXNpdG9yX2lkIjoiMzQxMjE5OTcwNzQxMjMzNTg1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ad2ed856fafab9947d7769f31797a706e3794084d0f85ea1342702a08c55f0d5 |
| hovercard-subject-tag | issue:4213485196 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/usethis-python/usethis-python/1822/issue_layout |
| twitter:image | https://opengraph.githubassets.com/90fea50c4ae76a0537ab93c638f1e61462ba16875968021a3bc367f31ffd7e4b/usethis-python/usethis-python/issues/1822 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/90fea50c4ae76a0537ab93c638f1e61462ba16875968021a3bc367f31ffd7e4b/usethis-python/usethis-python/issues/1822 |
| og:image:alt | Problem Agents (and developers) sometimes write Python docstrings using RST double-backtick markup (e.g. install_requires) when single backticks should be used instead. This was caught in code revi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nathanjmcdougall |
| hostname | github.com |
| expected-hostname | github.com |
| None | 299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8 |
| turbo-cache-control | no-preview |
| go-import | github.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git |
| octolytics-dimension-user_id | 216362695 |
| octolytics-dimension-user_login | usethis-python |
| octolytics-dimension-repository_id | 842189705 |
| octolytics-dimension-repository_nwo | usethis-python/usethis-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 842189705 |
| octolytics-dimension-repository_network_root_nwo | usethis-python/usethis-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c5a57f04eeb310f57c73fd6d751d957e2ca27ed2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width