open-telemetry / open-telemetry/opentelemetry-python
Update typing style
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 19
Description
Following https://github.com/open-telemetry/opentelemetry-python/pull/4455 some of the codebase now uses from __future__ import annotations and the more modern type hinting of:
| Nonerather thanOptional|rather thanUniondict,list, tuplerather thantyping.Dict,typing.List, ``typing.Tuple
For consistency it would be better to move to the newer typing style across the whole codebase.
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 by reviewing pull request 4455 and the existing Python codebase to identify typing patterns that still use Optional, Union, or typing collection types. Update the remaining code for consistency with the newer style, including future annotations where needed, and verify that the whole codebase uses the intended conventions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100