oracle / oracle/oci-python-sdk
Add type annotations compatible with mypy/pyright
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 474
- Forks
- 321
- Avg merge
- 23m
- Merged PRs (30d)
- 4
Description
Hi, could you please add type annotations in the format which would mypy and/or pyright recognize?
I've tried both mypy/pyright and their stubgens, unfortunately, none of them is able to parse type annotations in format of (core/models/instance.py):
:param defined_tags:
The value to assign to the defined_tags property of this Instance.
:type defined_tags: dict(str, dict(str, object))
It looks like, most of OCI SDK code is generated. If so, it should be possible to adopt generation process in order to support proper type annotations.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with core/models/instance.py and compare its :type defined_tags notation with the formats accepted by mypy and pyright. Then trace the generation process mentioned in the issue to determine where annotations are produced. Done means generated OCI SDK annotations can be parsed by mypy or pyright, including the defined_tags example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100