@@ -54,7 +54,7 @@ def to_json(self) -> str:
5454 return self
5555
5656 @classmethod
57- def from_json(cls, json: str) -> ' AXNodeId' :
57+ def from_json(cls, json: str) -> AXNodeId:
5858 return cls(json)
5959
6060 def __repr__(self):
@@ -81,11 +81,11 @@ class ArrayOfStrings(list):
8181 '''
8282 Index of the string in the strings table.
8383 '''
84- def to_json(self) -> typing.List[' StringIndex' ]:
84+ def to_json(self) -> typing.List[StringIndex]:
8585 return self
8686
8787 @classmethod
88- def from_json(cls, json: typing.List[' StringIndex' ]) -> ' ArrayOfStrings' :
88+ def from_json(cls, json: typing.List[StringIndex]) -> ArrayOfStrings:
8989 return cls(json)
9090
9191 def __repr__(self):
@@ -128,7 +128,7 @@ def to_json(self) -> str:
128128 return self.value
129129
130130 @classmethod
131- def from_json(cls, json: str) -> ' AXValueSourceType' :
131+ def from_json(cls, json: str) -> AXValueSourceType:
132132 return cls(json)""" )
133133
134134 type = CdpType .from_json (json_type )
@@ -182,16 +182,16 @@ class AXValue:
182182 A single computed AX property.
183183 '''
184184 #: The type of this value.
185- type: ' AXValueType'
185+ type: AXValueType
186186
187187 #: The computed value of this property.
188188 value: typing.Optional[typing.Any] = None
189189
190190 #: One or more related nodes, if applicable.
191- related_nodes: typing.Optional[typing.List[' AXRelatedNode' ]] = None
191+ related_nodes: typing.Optional[typing.List[AXRelatedNode]] = None
192192
193193 #: The sources which contributed to the computation of this property.
194- sources: typing.Optional[typing.List[' AXValueSource' ]] = None
194+ sources: typing.Optional[typing.List[AXValueSource]] = None
195195
196196 def to_json(self) -> T_JSON_DICT:
197197 json: T_JSON_DICT = dict()
@@ -205,7 +205,7 @@ def to_json(self) -> T_JSON_DICT:
205205 return json
206206
207207 @classmethod
208- def from_json(cls, json: T_JSON_DICT) -> ' AXValue' :
208+ def from_json(cls, json: T_JSON_DICT) -> AXValue:
209209 return cls(
210210 type=AXValueType.from_json(json['type']),
211211 value=json['value'] if 'value' in json else None,
@@ -264,11 +264,11 @@ def test_cdp_command():
264264 }
265265 expected = dedent ("""\
266266 def get_partial_ax_tree(
267- node_id: typing.Optional[' dom.NodeId' ] = None,
268- backend_node_id: typing.Optional[' dom.BackendNodeId' ] = None,
269- object_id: typing.Optional[' runtime.RemoteObjectId' ] = None,
267+ node_id: typing.Optional[dom.NodeId] = None,
268+ backend_node_id: typing.Optional[dom.BackendNodeId] = None,
269+ object_id: typing.Optional[runtime.RemoteObjectId] = None,
270270 fetch_relatives: typing.Optional[bool] = None
271- ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.List[' AXNode' ]]:
271+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,typing.List[AXNode]]:
272272 '''
273273 Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
274274
@@ -467,7 +467,7 @@ def test_cdp_command_ref_parameter():
467467 expected = dedent ("""\
468468 def resolve_animation(
469469 animation_id: str
470- ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,' runtime.RemoteObject' ]:
470+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,runtime.RemoteObject]:
471471 '''
472472 Gets the remote object of the Animation.
473473
@@ -544,7 +544,7 @@ def test_cdp_command_multiple_return():
544544 }
545545 expected = dedent ("""\
546546 def get_encoded_response(
547- request_id: ' network.RequestId' ,
547+ request_id: network.RequestId,
548548 encoding: str,
549549 quality: typing.Optional[float] = None,
550550 size_only: typing.Optional[bool] = None
@@ -615,8 +615,8 @@ def test_cdp_command_array_of_ref_parameter():
615615 expected = dedent ("""\
616616 def grant_permissions(
617617 origin: str,
618- permissions: typing.List[' PermissionType' ],
619- browser_context_id: typing.Optional[' target.BrowserContextID' ] = None
618+ permissions: typing.List[PermissionType],
619+ browser_context_id: typing.Optional[target.BrowserContextID] = None
620620 ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
621621 '''
622622 Grant specific permissions to the given origin and reject all others.
@@ -666,10 +666,10 @@ class RecordingStateChanged:
666666 Called when the recording state for the service has been updated.
667667 '''
668668 is_recording: bool
669- service: ' ServiceName'
669+ service: ServiceName
670670
671671 @classmethod
672- def from_json(cls, json: T_JSON_DICT) -> ' RecordingStateChanged' :
672+ def from_json(cls, json: T_JSON_DICT) -> RecordingStateChanged:
673673 return cls(
674674 is_recording=bool(json['isRecording']),
675675 service=ServiceName.from_json(json['service'])
@@ -730,7 +730,7 @@ class WindowOpen:
730730 user_gesture: bool
731731
732732 @classmethod
733- def from_json(cls, json: T_JSON_DICT) -> ' WindowOpen' :
733+ def from_json(cls, json: T_JSON_DICT) -> WindowOpen:
734734 return cls(
735735 url=str(json['url']),
736736 window_name=str(json['windowName']),
0 commit comments