Infer base classes in signatures
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
No file or test is identified in the issue. Start by locating the signature-inference and profiling entry points, then examine how observed types become Union annotations; done means using a common non-object base class when appropriate and retaining Union when no interesting base applies.
Written by the indexing model from the issue text.
Description
If a function gets called with two different argument types A and B that have a common base class C, we may want to infer C as the argument type instead of Union[A, B] -- unless C is object or some other type that isn't interesting.
To implement this, we could record the MROs of all types in the profile.
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Getting set up
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 dropbox/pyannotate
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
dropbox/pyannotate#124 · 3 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
dropbox/pyannotate#123 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
dropbox/pyannotate#115 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
dropbox/pyannotate#109 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
dropbox/pyannotate#103 · 6 comments · 1 reaction ·
All issues in dropbox/pyannotate
Similar issues
-
ACK_WAITING HELP_WANTED UPDATE_CS
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OWASP/CheatSheetSeries#2458 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
BasedHardware/omi#19711 ·
Maintainers usually reply within 1 day
-
Qwen3_5MoeModel no longer returns router_logits, breaking aux loss with output_router_logits=TrueOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
huggingface/transformers#49172 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
vllm-project/vllm-metal#885 ·
Maintainers usually reply within 1 day