Repository navigation
refactor: inline GreatDocs methods that only forward a call - #467
Merged
Merged
Conversation
Remove six private GreatDocs methods whose only job was forwarding: read the package root from the resolved layout, detect Go CLI projects, detect Rust CLI projects, place one skill in well-known directories, generate MCP reference pages and escape HTML. Call the existing operations directly. Remove tests whose only subject was forwarding. The HTML-escaping tests checked the standard library; the package-root tests repeated tests of layout resolution, and the Go and Rust detection tests repeated tests of the detection functions. Remove twelve package-root patches from logo, favicon and hero tests. Each test already resolves the package root to its temporary directory, so these patches did not affect outcomes. Behaviour and build output are unchanged.
Use the module-level names for `json`, `os`, `re`, `shutil`, `subprocess`, `sys`, `datetime` and `read_yaml`. Remove the repeated function-level imports, including seven private aliases, and update their uses. Two aliased imports inside the Quarto configuration update stay as they are. Behaviour and build output are unchanged.
📚 Preview this PR's docs locallyFetch the just-built site and open it in your browser: # this exact build
great-docs preview --run 40878441983
# or always the latest build for this PR
great-docs preview --pr 467Auth & tips
|
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.
This PR removes six private
GreatDocsmethods whose only job was to forward to another call, such as reading the package root from the layout or escaping HTML. Each added a name tocore.pythat readers had to look up only to find a one-line delegation, and tests patched them as if they did more: twelve package-root patches never changed their tests' outcome.It also removes function-level imports that repeat a module-level import, among them eight copies of
import subprocess. Builds produce the same output.