@@ -72,7 +72,7 @@ def __init__(self, message: str, code: int = -32600):
72
72
class Request (dict ):
73
73
"""A request object that wraps params and allows async return
74
74
"""
75
- def __init__ (self , plugin : 'Plugin' , req_id : Optional [int ], method : str ,
75
+ def __init__ (self , plugin : 'Plugin' , req_id : Optional [str ], method : str ,
76
76
params : Any , background : bool = False ):
77
77
self .method = method
78
78
self .params = params
@@ -700,13 +700,9 @@ def notify_progress(self, request: Request,
700
700
request .progress (progress , progress_total , stage , stage_total )
701
701
702
702
def _parse_request (self , jsrequest : Dict [str , JSONType ]) -> Request :
703
- i = jsrequest .get ('id' , None )
704
- if not isinstance (i , int ) and i is not None :
705
- raise ValueError ('Non-integer request id "{i}"' .format (i = i ))
706
-
707
703
request = Request (
708
704
plugin = self ,
709
- req_id = i ,
705
+ req_id = jsrequest . get ( 'id' , None ) ,
710
706
method = str (jsrequest ['method' ]),
711
707
params = jsrequest ['params' ],
712
708
background = False ,
0 commit comments