Azure / Azure/azure-sdk-tools

[Python APIView] Overloaded methods are rendered without showing the final implementation

Open
#14,307 0 comments 0 reactions 0 assignees View on GitHub
APIView customer-reported Python question
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

**Bad code snippet:**
```python
def create_or_update(
```
In APIView, overloaded methods such as `create_or_update` are rendered without displaying the final implementation, which should be decorated with `@distributed_trace`. This misrepresents the actual code structure and omits important implementation details.

**Expected behavior:**
APIView should render both the overloads and the final implementation of the method, including any decorators such as `@distributed_trace`.

**Good code snippet:**
```python
@distributed_trace
def create_or_update(
...
```
This ensures that viewers of APIView see the complete method definition, including its implementation and relevant decorators.

Contributor guide

Open the contributing guide

Research direction

Start in the APIView rendering or parsing path for Python methods and trace how the create_or_update definition is handled. Reproduce the rendering with the provided overloaded-method example, then compare the output with the source, including the @distributed_trace decorator. Done means APIView displays both overloads and the final implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.