Skip to content

Commit 01b9d4a

Browse files
committed
chore: validate dictionary keys
1 parent 38ab7fb commit 01b9d4a

17 files changed

+924
-687
lines changed

api.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9481,7 +9481,7 @@
94819481
"name": "string",
94829482
"properties": {}
94839483
},
9484-
"comment": "URL of the resource if available.",
9484+
"comment": "Optional URL of the resource if available.",
94859485
"returnComment": "",
94869486
"required": false,
94879487
"templates": []
@@ -9493,7 +9493,7 @@
94939493
"name": "number",
94949494
"properties": {}
94959495
},
9496-
"comment": "0-based line number in the resource if available.",
9496+
"comment": "Optional 0-based line number in the resource if available.",
94979497
"returnComment": "",
94989498
"required": false,
94999499
"templates": []
@@ -9505,7 +9505,7 @@
95059505
"name": "number",
95069506
"properties": {}
95079507
},
9508-
"comment": "0-based column number in the resource if available.",
9508+
"comment": "Optional 0-based column number in the resource if available.",
95099509
"returnComment": "",
95109510
"required": false,
95119511
"templates": []
@@ -9703,7 +9703,7 @@
97039703
"name": "string",
97049704
"properties": {}
97059705
},
9706-
"comment": "Path where the download should be saved. The directory structure MUST exist as `saveAs` will not create it.",
9706+
"comment": "Path where the download should be saved.",
97079707
"returnComment": "",
97089708
"required": true,
97099709
"templates": []
@@ -10632,7 +10632,7 @@
1063210632
"kind": "method",
1063310633
"name": "headers",
1063410634
"type": {
10635-
"name": "Object",
10635+
"name": "Object<string, string>",
1063610636
"properties": {}
1063710637
},
1063810638
"comment": "",
@@ -12216,7 +12216,7 @@
1221612216
"kind": "property",
1221712217
"name": "viewport",
1221812218
"type": {
12219-
"name": "null|Object",
12219+
"name": "?Object",
1222012220
"properties": {
1222112221
"width": {
1222212222
"kind": "property",
@@ -12358,7 +12358,7 @@
1235812358
"name": "number",
1235912359
"properties": {}
1236012360
},
12361-
"comment": "Non-negative accuracy value. Defaults to `0`.",
12361+
"comment": "Optional non-negative accuracy value. Defaults to `0`.",
1236212362
"returnComment": "",
1236312363
"required": false,
1236412364
"templates": []

playwright/accessibility.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from typing import Any, Dict, Optional
15+
from typing import Dict, Optional
1616

1717
from playwright.connection import Channel
1818
from playwright.element_handle import ElementHandle
1919
from playwright.helper import locals_to_params
2020

2121

22-
def _ax_node_from_protocol(axNode: Dict[str, Any]) -> Dict[str, Any]:
22+
def _ax_node_from_protocol(axNode: Dict) -> Dict:
2323
result = {**axNode}
2424
if "valueNumber" in axNode:
2525
result["value"] = axNode["valueNumber"]
@@ -60,7 +60,7 @@ def __init__(self, channel: Channel) -> None:
6060

6161
async def snapshot(
6262
self, interestingOnly: bool = None, root: ElementHandle = None
63-
) -> Optional[Dict[str, Any]]:
63+
) -> Optional[Dict]:
6464
params = locals_to_params(locals())
6565
if root:
6666
params["root"] = root._channel

0 commit comments

Comments
 (0)