facebook/TestSlide

Simplify typehints

Open

#248 创建于 2020年10月2日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)Python (58 fork)auto 404
easyenhancementgood first issuehelp wanted

仓库指标

Star
 (147 star)
PR 合并指标
 (PR 指标待抓取)

描述

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).

贡献者指南