Skip to content

v4: Rename inconsistent public APIs #216

@jtdub

Description

@jtdub

Description

Several public API names don't follow Python conventions or are unclear:

Current Proposed Reason
tags_add() / tags_remove() add_tags() / remove_tags() Python convention
depth() method depth property Consistent with is_leaf, is_branch
cisco_style_text() formatted_text() or indented_text() Not Cisco-specific
dump_simple() to_lines() or render() Clearer intent
config_to_get_to() remediation(target) or diff_to(target) Current name is hard to parse

Breaking Change

Yes — all renamed methods would break existing code. Provide deprecation aliases in a 3.x release if feasible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v4-enhancementEnhancement planned for hier_config v4.0.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions