[Python APIView] Self-referential TRACING_CONTEXT rendered as `TRACING_CONTEXT = TRACING_CONTEXT`
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 130
Description
Location: azure.core.pipeline.policies.DistributedTracingPolicy (APIView rendering)
Bad code snippet:
TRACING_CONTEXT = TRACING_CONTEXT
Description:
This is a rendering/parsing bug in the language parser used by APIView. The APIView shows a self-referential assignment which is not valid Python and is misleading — the original source intended TRACING_CONTEXT to be a constant string key (or similarly annotated constant). The current rendering suggests code that would raise a NameError at runtime and does not reflect the real API surface.
Good code examples (what the APIView should display):
Option A (simple constant):
TRACING_CONTEXT = "tracing_context"
Option B (with type annotation):
TRACING_CONTEXT: str = "tracing_context"
Please update the language parser/rendering so APIView shows the actual constant value or annotation instead of the self-referential assignment.
Contributor guide
Research direction
Start with the APIView language parser/rendering path for azure.core.pipeline.policies.DistributedTracingPolicy. Compare its output with the original constant declaration and verify that the rendered API shows the actual constant value or annotation rather than a self-referential assignment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100