JelleZijlstra / autotyping

Automatically add simple type annotations to your code
233 stars 19 forks source link

Add annotations to `__exit__` params #8

Closed JelleZijlstra closed 3 years ago

JelleZijlstra commented 3 years ago

From #1: If a function is named __exit__ and has exactly four parameters, the last three should be annotated as Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]. The first is self. We should do the same with __aexit__.