SIGN IN SIGN UP

Use @overload to type `get_user` (#3502)

LSPs and type checkers complain about
`Github(...).get_user().create_repo(...)` and other such calls which
only work on the authenticated user.

Because whether the user is named or authenticated depends entirely on a
`login` being provided or not, `overload` allows statically separating
these two cases and makes typecheckers happier.

Demo on the mypy playground:
- [current
(union)](https://mypy-play.net/?gist=6f5eb7865f4549ec041b8df3fee14805)
- [proposal
(overload)](https://mypy-play.net/?gist=40490f9b0f58b40b3f60ca908583de24)

---------

Co-authored-by: Enrico Minack <github@enrico.minack.dev>
X
xmo-odoo committed
c8231b842fcd580a2cd84d17819a2018b611001f
Parent: a247f8b
Committed by GitHub <noreply@github.com> on 6/8/2026, 1:32:11 PM