dropbox / dropbox/pyannotate

Infer base classes in signatures

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
60
PR merge metrics
No merged PRs in 30d

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.