facebook / facebook/TestSlide

Simplify typehints

Offen
#248 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
easy enhancement good first issue help wanted
Vorherrschende Sprache
Python
Sterne
149
Forks
62
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.