Skip to content

Conversation

@meshy
Copy link
Collaborator

@meshy meshy commented Oct 7, 2025

Until now the docstrings have prioritised people reading the code. Now that we generate API docs from them, it's sensible to reformat them so that they make nicer docs.

@meshy meshy requested a review from a team as a code owner October 7, 2025 10:52
Comment on lines 62 to 65
Note:
This has a bit of a clunky name. This is a deliberate attempt to
discourage its use. It reflects that using this function is a
bit of a clunky thing to do.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This is lifted from other internal docs. There's probably a better way of putting this. Suggestions welcome.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gone with:

     Note:
         This has a bit of a clunky name. This is a deliberate attempt to
-        discourage its use. It reflects that using this function is a
-        bit of a clunky thing to do.
+        discourage its use. It acts as a code-smell to highlight that places
+        which use it may need further work to achieve full control over how
+        transactions are managed.

@meshy meshy force-pushed the meshy/docs/docstrings branch from e997ff7 to 6c3e838 Compare October 8, 2025 00:11
meshy added 7 commits October 8, 2025 10:19
This new structure causes these blocks to be rendered in admonitions in
the generated docs, and renders references to related functions as
links.
This will be especially useful when linking to settings pages from
docstrings.
This makes it read consistently with the other docstrings in this file,
separates comments on rolling back from those on raising errors, and
links to docs on a related setting.
These notes are for internal use, but the docstrings are now used to
generate public API docs.
@meshy meshy force-pushed the meshy/docs/docstrings branch from 6c3e838 to 75242e4 Compare October 8, 2025 09:19
@meshy meshy merged commit dc44a46 into main Oct 8, 2025
7 checks passed
@meshy meshy deleted the meshy/docs/docstrings branch October 8, 2025 09:22
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.

3 participants