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

    pythonv1.0Features being tracked for the version 1.0 GA

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions