Add PEP 484 type annotations to orbit/utils/ modules
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- developer-experience, tooling
Research direction
For the first PR, read orbit/utils/general.py and identify its public functions. Add PEP 484 annotations using Python 3.9+ syntax and future annotations without changing logic. Done means the public functions in general.py are annotated; extend the same approach to the remaining orbit/utils/ modules only after feedback.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
I have been exploring the codebase and noticed that orbit/utils/ has no type annotations across most of its modules (the only exception is logger.py). As someone trying to contribute, I found myself constantly jumping between files to figure out what types functions expect and return, especially for the NumPy/Pandas-heavy ones.
Describe the solution you'd like
Add PEP 484 type annotations to the public functions in orbit/utils/. I did a quick audit and found 28 functions across 8 files missing annotations. I would like to contribute these as a series of small PRs, starting with general.py.
Approach I would follow:
- Python 3.9+ built-in generics (
list[str]notList[str]) from __future__ import annotationsfor the|union syntax on Python 3.9- no logic changes whatsoever, annotations only
Describe alternatives you've considered
just documenting types in docstrings but that doesn't help with static analysis or IDE support, which is half the value here.
Additional context
im happy to start small with just general.py and adjust my approach based on feedback before going further.
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 147
- PR merge metrics
- No merged PRs in 30d
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.
More from uber/orbit
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
enhancement refactor
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100