Correctly detects calls to `register()` with a function of incompatible return
type. Correctly recognizes the `register()`, `dispatch()`, and
`_clear_cache()` methods on a generic function, as well as the `registry`
mapping.
Possible future improvements: it would be amazing if `register()` checked if
the first argument of the registered callable is indeed of valid type. This
would require Callable[] to support varargs. It would also be great if we
could read the arguments of the remaining arguments during `@singledispatch()`
and cross-check them during `register()` with the currently registered
implementation. Again, this would require Callable[] to become much more
advanced.
I added strong types to the class that users are likely to interact with and left
the rest untyped for now. This is needed to support Flask.
Permission is given here - https://github.com/pallets/flask/issues/2012
The ujson module apparently will accept both bytes and text format
input, however, it does always output a str (both on Python 2 and
Python 3).
Some discussion in: https://github.com/python/typeshed/pull/460
* Add pytz basic typing
* Add pytz.lazy basic typing
* Move the files to the correct path
* Move files to correct directory
* Ignore issue with different sig from supertype