+8
−8
+3
−1
+6
−1
Loading
BREAKING CHANGE: Type narrowing of `list()` methods return objects
from RESTObject to a concrete subclass (for example `MergeRequest`)
can become redundant.
Currently the RESTObjectList type hints yielded objects
as base RESTObject. However, the ListMixin is now generic
and will return the RESTObject subclass based on the RESTManager
typing.
Using `typing.Generic` it is possible to make RESTObjectList
type hint a specific subclass of the RESTObject.
Iterating over `list()` call the ListMixin will now yield
the same object class because both `list` and `RESTObjectList`
will have the same type hinted subclass.
Signed-off-by:
Igor Ponomarev <igor.ponomarev@collabora.com>