facebook/TestSlide

Simplify typehints

Open

#248 opened on 2020年10月2日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)Python (58 forks)auto 404
easyenhancementgood first issuehelp wanted

Repository metrics

Stars
 (147 stars)
PR merge metrics
 (PR metrics pending)

説明

As per @fornellas comments on #246 do these:

  • Unions of BaseException & other exception types (eg: Exception). Shouldn't BaseException be enough? All Python exception are subclasses of it, I think it should work just fine with only it.

  • There are lots of Callable types (no args, no return) or Callable[[a,b,c...], d], mostly related to DSL hooks, such as examples, before / after hooks etc. TBH, this PR is awesome as it is, but I was thinking about having custom types such as ExampleFunction = Callable[[_ContextData], None] (non-blocking here to be clear).

コントリビューターガイド