Skip to content

Python: middleware: Rename 'next' parameter to avoid shadowing built-in #3583

@eavanvalkenburg

Description

@eavanvalkenburg

The next parameter in middleware functions shadows Python's built-in next() function.

File: python/samples/getting_started/middleware/agent_and_run_level_middleware.py
Location: Line ~179

\\python
async def function_logging_middleware(
context: FunctionInvocationContext,
next: Callable[ # <- rename 'next' because it's a built-in
[FunctionInvocationContext], Awaitable[None]
],
) -> None:
\\

Action: Consider renaming the next parameter to avoid shadowing the built-in.

Parent issue: #3575

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions