facebook / facebook/TestSlide

Simplify typehints

Open
#248 0 comments 0 reactions 0 assignees View on GitHub
easy enhancement good first issue help wanted
Dominant language
Python
Stars
149
Forks
62
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.