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

Labels

pythonv1.0Features being tracked for the version 1.0 GA

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions