Add generic return type to `from_pretrained` (#1325)
* Add generic return type to from_pretrained
* Sort imports in tests
* Apply black v23.1.0 rather than v22.3.0
Sidenote: The pre-commit black version differs from the one the CI uses.
* Add return type hint for from_pretrained_keras
Two solutions are possible here: either KerasModelHubMixin like now, or just KerasModelHubMixin with from __future__ import annotations. I went with the first option relatively arbitrarily.
* make style
---------
Co-authored-by: Lucain <lucainp@gmail.com>