|
16 | 16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 |
|
18 | 18 | importimportlib |
19 | | -fromtypingimportAny,Dict,Optional |
| 19 | +fromtypingimportAny,Dict,Optional,Type |
20 | 20 |
|
21 | 21 | from .clientimportGitlab,GitlabList |
22 | 22 |
|
@@ -171,7 +171,9 @@ class RESTObjectList(object): |
171 | 171 | _list: A GitlabList object |
172 | 172 | """ |
173 | 173 |
|
174 | | -def__init__(self,manager:"RESTManager",obj_cls,_list:GitlabList)->None: |
| 174 | +def__init__( |
| 175 | +self,manager:"RESTManager",obj_cls:Type[RESTObject],_list:GitlabList |
| 176 | + )->None: |
175 | 177 | """Creates an objects list from a GitlabList. |
176 | 178 |
|
177 | 179 | You should not create objects of this type, but use managers list() |
@@ -246,7 +248,7 @@ class RESTManager(object): |
246 | 248 | """ |
247 | 249 |
|
248 | 250 | _path:Optional[str]=None |
249 | | -_obj_cls:Optional[Any]=None |
| 251 | +_obj_cls:Optional[Type[RESTObject]]=None |
250 | 252 | _from_parent_attrs:Dict[str,Any]= {} |
251 | 253 |
|
252 | 254 | def__init__(self,gl:Gitlab,parent:Optional[RESTObject]=None)->None: |
|