Back to all reviewers

Maintain naming consistency

anthropics/claude-agent-sdk-python
Based on 2 comments
Python

Ensure field names, method names, and identifiers are consistent across different contexts including cross-language SDKs, API specifications, and data structures. When multiple naming options exist, prioritize alignment with established patterns and accurate representation of the underlying functionality or data.

Naming Conventions Python

Reviewer Prompt

Ensure field names, method names, and identifiers are consistent across different contexts including cross-language SDKs, API specifications, and data structures. When multiple naming options exist, prioritize alignment with established patterns and accurate representation of the underlying functionality or data.

For cross-platform consistency, align naming conventions between different language implementations:

# Good: Aligns with TypeScript SDK naming
can_use_tool: ToolPermissionCallback | None = None

# Avoid: Inconsistent with other SDK implementations  
tool_permission_callback: ToolPermissionCallback | None = None

For API alignment, ensure field names match the actual data structure or API specification:

# Good: Matches actual API field name
total_cost_usd=data["total_cost_usd"]

# Avoid: Mismatched field name
cost_usd=data["cost_usd"]  # when API actually uses "total_cost_usd"

Proactively identify naming inconsistencies during code reviews and prioritize fixes that improve overall system coherence.

2
Comments Analyzed
Python
Primary Language
Naming Conventions
Category

Source Discussions