Skip to content

no-invalid-argument-name-suppression

External parameter spelling must use framework aliases instead of disabling snake_case naming.

Why

Naming suppressions leak an external wire vocabulary into Python APIs and normalize future exceptions.

Fix

Keep the Python parameter snake_case and preserve the external spelling with FastAPI Query/Path aliases or Pydantic Field aliases.

Examples

Before — flagged A wire parameter disables Python naming
app/routes.py
def route(businessFunction: str): # ruff: ignore[invalid-argument-name]
...
After — preferred A framework alias preserves external spelling
app/routes.py
from fastapi import Query
def route(business_function: str = Query(alias="businessFunction")): ...