Skip to content

Fix typo disabled vs disable#11

Merged
jschlyter merged 1 commit intomainfrom
disable_typo
Nov 24, 2025
Merged

Fix typo disabled vs disable#11
jschlyter merged 1 commit intomainfrom
disable_typo

Conversation

@jschlyter
Copy link
Copy Markdown
Member

@jschlyter jschlyter commented Nov 24, 2025

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Corrected zone filtering logic to use the proper attribute naming convention for zone exclusion.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 24, 2025

Walkthrough

A field rename refactoring changes the InfobloxZone dataclass attribute from disabled to disable. This update cascades through the WAPI field requests, the dataclass definition, and zone filtering logic to maintain consistency across the codebase.

Changes

Cohort / File(s) Summary
Dataclass field rename and WAPI integration
wapi2nsconf/wapi.py
Renames InfobloxZone dataclass field from disabled: bool to disable: bool. Updates from_wapi() constructor to populate the disable field and modifies _return_fields request to fetch disable instead of disabled from the WAPI.
Zone filtering logic update
wapi2nsconf/cli.py
Updates zone filtering condition to check zone.disable instead of zone.disabled, reflecting the renamed dataclass field.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Straightforward, homogeneous field rename across two files with consistent updates
  • No logic changes, only attribute name updates and corresponding references
  • Limited scope and clear intent

Poem

🐰 A field once called disabled, now goes by disable,
Through wapi and cli, the change spreads reliable,
One name to rename them all, a refactor so clean,
The simplest of renames we've ever seen! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix typo disabled vs disable' accurately reflects the main change: renaming the zone attribute from 'disabled' to 'disable' across the codebase.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch disable_typo

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
wapi2nsconf/wapi.py (1)

14-22: Verification complete: rename is fully consistent, no remaining disabled references

The rg search confirms no remaining references to disabled in the codebase. The rename to disable is complete and aligned across the dataclass field (line 17), from_wapi mapping (line 43), and _return_fields list (line 72). Internally this looks good.

Consider backward‑compat alias for external callers

If any external code imports InfobloxZone and accesses zone.disabled, this will break. If you want a softer transition, you could add a read‑only compatibility property:

 @dataclass(frozen=True)
 class InfobloxZone:
     fqdn: str
     disable: bool
     extattrs: dict
     view: str
     ns_group: str | None = None
     description: str | None = None
+
+    @property
+    def disabled(self) -> bool:
+        """Backward compatibility alias for older callers."""
+        return self.disable
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 363ff4e and d08d855.

📒 Files selected for processing (2)
  • wapi2nsconf/cli.py (1 hunks)
  • wapi2nsconf/wapi.py (2 hunks)
🔇 Additional comments (1)
wapi2nsconf/cli.py (1)

50-82: Filter now correctly honors the disable flag

Using if zone.disable: matches the updated InfobloxZone field and will correctly skip zones marked as disabled in WAPI, while keeping existing filtering logic (ns_groups / extattrs) intact.

@jschlyter jschlyter merged commit df317f7 into main Nov 24, 2025
8 checks passed
@jschlyter jschlyter deleted the disable_typo branch November 24, 2025 12:04
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