Fix three more docstrings that name parameters the functions do not have - #2409
Merged
Merged
Conversation
Follow-up to pymc-devs#2408, same class of mismatch. `FunctionGraph.import_var` takes `var` but documents `variable`. `replace_patterns` takes `x` but documents `s`; its own summary line already says "Replace `replace` in string `x`". `toposort_with_orderings` documents `outputs`, which is not a parameter, and leaves `blockers` undocumented. It also had the remaining entry backwards: `graphs` was described as "Graph inputs". Both summary lines say otherwise - this function's own reads "between blocker (input) and graphs (output) variables", and `toposort`, which it delegates to, says "between graphs (outputs) and blockers (inputs)".
ricardoV94
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #2408 — same class of mismatch, three more sites. Docs only, no code touched.
FunctionGraph.import_vartakesvarbut documentsvariable:replace_patterns(d3viz) takesxbut documentss. Its own summary line already refers to the argument correctly — "Replacereplacein stringx" — so the Parameters entry is the odd one out.toposort_with_orderingsis the one I asked about on #2408, and I think the evidence now settles it. The signature is:but the Parameters section documents
graphs,outputsandorderings—outputsisn't a parameter, andblockersis missing. The remaininggraphsentry was also backwards, describing it as "Graph inputs". Two summary lines say the opposite:toposort, which it delegates to for the no-orderings branch: "Topologically sort of Apply nodes between graphs (outputs) and blockers (inputs)."and the implementation agrees — the
# the inputs are used to decide where to stop expandingcomment sits directly aboveif blockers:. Sographsare the outputs andblockersare the inputs, and the entry that saidoutputswas describingblockersunder the wrong name.I've made it:
If you'd rather I'd left that one alone, or you read the roles differently, say so and I'll drop it from this PR — the other two stand on their own.
Related Issue
Checklist
ruff checkclean on all three filesType of change