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