Repository navigation
Docs: Correct stale claims and trim comments to house style - #115
Merged
Merged
Conversation
Four claims had drifted from the code: - The object-tab column list described the table's `fields`, not its `default_columns`. Tags and Created render by default and were missing; File does not and was listed as if it did. - The per-row action was documented as an "Unlink button". The table uses NetBox's stock ActionsColumn, which labels it Delete; only the download button is custom. Reworded to name the real label and state that it removes the assignment alone. - The display_default warning predates 11.3.1. Now that every panel position is resolved by a string compare at render time, an unrecognized value matches nothing and renders no attachment UI at all, rather than producing a non-functional panel. - checks.py treats the W001-W003 IDs as a published contract, but they appeared only in the changelog. They are now in the removed-settings table alongside a SILENCED_SYSTEM_CHECKS example.
Comment cleanup only; no behavior change. - Strip issue references from internal comments in checks.py, conftest.py, test_checks.py, and three test_new_features.py banners, which are now titled by area like the four that follow them. The two management commands keep theirs: operators read those docstrings and the `help` text while debugging an upgrade, where the ticket is real context. - Collapse the Google-style Args/Returns blocks in utils.py to terse prose matching template_content.py and checks.py. The old docstrings on validate_object_type restated the mixed-mode rules the branches below already spell out; what remains is the part the code cannot say, that custom objects match on CustomObjectType.name rather than their generated class name. Two comments that only restated their own docstring are gone. orphan_cleanup.py keeps its arg contracts, being a pure-helper module tested without Django. - The ID-contract note in checks.py now points at docs/configuration.md, which documents W001-W003 as of the previous commit. - Run djlint over netboxattachment_list.html.
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Audit of every doc file and code comment after the 11.3.0 / 11.3.1 custom-object and panel-consolidation work. Those releases changed how panels resolve, but the prose was not re-checked against the code.
Doc claims that had drifted
docs/usage.md— the object-tab column list describedNetBoxAttachmentForObjectTable.Meta.fieldsrather than itsdefault_columns. Tags and Created render by default and were missing; File does not and was listed as if it did.docs/usage.md— the per-row action was documented as an "Unlink button". The table uses NetBox's stockActionsColumn, which labels it Delete; only the download button is custom. Reworded to name the real label and state that it removes the assignment alone.docs/configuration.md— thedisplay_defaultwarning predated 11.3.1. Now that every panel position is resolved by a string compare at render time, an unrecognized value matches nothing and renders no attachment UI at all, rather than a "non-functional panel extension".docs/configuration.md—checks.pytreats theW001–W003IDs as a published contract, but they appeared only in the changelog. They are now in the removed-settings table alongside aSILENCED_SYSTEM_CHECKSexample.Comment style
checks.py,conftest.py,test_checks.py, and threetest_new_features.pybanners, now titled by area like the four that follow them. The two management commands keep theirs — operators read those docstrings and thehelptext while debugging an upgrade.Args:/Returns:blocks inutils.pyto terse prose matchingtemplate_content.pyandchecks.py. The oldvalidate_object_typedocstring restated the mixed-mode rules its own branches already spell out; what remains is the part the code cannot say — that custom objects match onCustomObjectType.name, not their generated class name.orphan_cleanup.pykeeps its arg contracts, being a pure-helper module tested without Django.netboxattachment_list.html; the--tblr-danger-rgbCSS comment is preserved.Verification
ruff checkclean,ruff format --check60 files clean,djlint --check0 to update,make test95 passed.No behavior change, no version bump, no changelog entry —
version.pystays11.3.1.