-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix class hierachy and TypeVars of Serializer classes (#520)
* `ModelSerializer` was incorrectly deriving from `Serializer[Any]` and `BaseSerializer[T]`; replaced with `Serializer[T]`. This brings it into sync with DRF upstream. * Added TypeVar to `HyperlinkedModelSerializer` class. * Removed unnecessary `Generic[]` where implicit TypeVars are sufficient. https://mypy.readthedocs.io/en/stable/generics.html#defining-subclasses-of-generic-classes > If there are no Generic[...] in bases, then all type variables are collected in the lexicographic order (i.e. by first appearance).
- Loading branch information
Showing
2 changed files
with
8 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters