Skip to content

Add single-backtick convention for docstring code references to agent skill#1665

Merged
nathanjmcdougall merged 3 commits intomainfrom
copilot/update-docstring-code-reference-style
Mar 31, 2026
Merged

Add single-backtick convention for docstring code references to agent skill#1665
nathanjmcdougall merged 3 commits intomainfrom
copilot/update-docstring-code-reference-style

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 30, 2026

Agents were using RST-style double backticks (``) in docstrings instead of Markdown single backticks (`). The export-functions.py hook already normalizes these, but docstrings should be written correctly from the start.

  • Added "Docstring code references" section to usethis-python-code skill with convention, examples, and rationale
  • Bumped skill version 1.2 → 1.3
# Good
"""Add a dependency using `uv add`."""

# Bad
"""Add a dependency using ``uv add``."""

Copilot AI changed the title [WIP] Update agent config for code reference style in docstrings Add single-backtick convention for docstring code references to agent skill Mar 31, 2026
Copilot AI requested a review from nathanjmcdougall March 31, 2026 00:00
@nathanjmcdougall nathanjmcdougall merged commit 3e81c35 into main Mar 31, 2026
1 check passed
@nathanjmcdougall nathanjmcdougall deleted the copilot/update-docstring-code-reference-style branch March 31, 2026 22:03
nathanjmcdougall added a commit that referenced this pull request Mar 31, 2026
* Initial plan

* Add `usethis show license` command with heuristic license detection

Implements license detection using three heuristics:
1. Scan common license files at root using `identify[license]` package
2. Read `project.license` field from pyproject.toml (PEP 639/621)
3. Check `project.classifiers` for license classifiers

Outputs the license in SPDX format.

Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/737efe22-3ae6-4f6b-9a10-74becba773ee

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>

* Fix Ruff PLR0911, sync AGENTS.md with auto-generated docs

Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/737efe22-3ae6-4f6b-9a10-74becba773ee

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>

* Narrow exception handling per code review feedback

Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/737efe22-3ae6-4f6b-9a10-74becba773ee

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>

* Replace double backticks with single backticks in docstrings per #1665

Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/5fcc73f0-8882-4f34-b2a5-64541f9d5bc8

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>

* Don't recommend license classifiers in error message

Trove classifiers for licenses are deprecated.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Co-authored-by: Nathan McDougall <nathan.j.mcdougall@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent config for code reference style in docstrings

2 participants