Python generates ambiguous type imports
- Dominant language
- C#
- Stars
- 3.8k
- Forks
- 333
- Avg merge
- 16h 29m
- Merged PRs (30d)
- 116
Description
### What are you generating using Kiota, clients or plugins?
API Client/SDK
### In what context or format are you using Kiota?
Nuget tool
### Client library/SDK language
Python
### Describe the bug
Generating Microsoft Graph Beta using mypy 1.19.1 as we do in the integration tests results in errors
https://github.com/microsoft/kiota/actions/runs/22319588027/job/64574290141
Under mypy 1.17.x as we use in the python repos these errors are non present.
### Expected behavior
We generate code for Microsoft Graph that will compile using the stricter settings of mypy 1.19.1
### How to reproduce
Generate Microsoft Graph Beta and try to build using mypy 1.19.1
### Open API description file
_No response_
### Kiota Version
1.30
### Latest Kiota version known to work for scenario above?(Not required)
_No response_
### Known Workarounds
relax mypy to 1.17.x
### Configuration
_No response_
### Debug output
Click to expand log
```
```
### Other information
_No response_
Contributor guide
Research direction
Start by reproducing Microsoft Graph Beta generation with Kiota 1.30 and building the generated Python client with mypy 1.19.1, using the integration-test setup and linked workflow run as references. Inspect the generated type imports and mypy errors; done means the generated client passes the stricter mypy checks without requiring a downgrade to 1.17.x.
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
- 45/100