Skip to content

Docs: Correct stale claims and trim comments to house style - #115

Merged
Kani999 merged 3 commits into
mainfrom
docs-comment-accuracy
Jul 28, 2026
Merged

Kani999 merged 3 commits into
mainfrom
docs-comment-accuracy

Conversation

@Kani999

@Kani999 Kani999 commented Jul 28, 2026

Copy link
Copy Markdown
Owner

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 described NetBoxAttachmentForObjectTable.Meta.fields rather than its default_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 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.
  • docs/configuration.md — the display_default warning 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.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 style

  • Stripped issue references from internal comments in checks.py, conftest.py, test_checks.py, and three test_new_features.py banners, 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.
  • Collapsed the Google-style Args:/Returns: blocks in utils.py to terse prose matching template_content.py and checks.py. The old validate_object_type docstring restated the mixed-mode rules its own branches already spell out; what remains is the part the code cannot say — that custom objects match on CustomObjectType.name, not their generated class name. orphan_cleanup.py keeps its arg contracts, being a pure-helper module tested without Django.
  • Ran djlint over netboxattachment_list.html; the --tblr-danger-rgb CSS comment is preserved.

Verification

ruff check clean, ruff format --check 60 files clean, djlint --check 0 to update, make test 95 passed.

No behavior change, no version bump, no changelog entry — version.py stays 11.3.1.

Kani999 added 3 commits July 28, 2026 11:46
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.
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 30180fcb-a7c5-4a5d-a4b5-6cc8cefb534d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch docs-comment-accuracy

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Kani999
Kani999 merged commit 5cc72b8 into main Jul 28, 2026
9 checks passed
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.

1 participant