Use semantically meaningful, convention-compliant names everywhere (parameters, variables, fields, classes, constants), and avoid ad-hoc renaming/mapping that can create ambiguity or incorrect field exposure.
Apply these rules:
existing_* / incoming_* (or equivalent) over generic names like metadata, meta.snake_casePascalCase (e.g., GroqChat)UPPER_SNAKE_CASE (e.g., REGISTER_ENABLED)removesuffix('_app') over trimming characters with rstrip).Example (naming parameters by role):
def update_metadata_to(existing_metadata: dict, incoming_metadata: dict) -> dict:
"""Merge incoming metadata payload into an existing metadata mapping."""
existing_metadata.update(incoming_metadata)
return existing_metadata
Enter the URL of a public GitHub repository