Improve self argument typing (#2900)

4 files changed