Skip to content

Commit d4ccf6a

Browse files
chore: better type validation (#112)
Co-authored-by: Max Schmitt <max@schmitt.mx>
1 parent 735c3a2 commit d4ccf6a

18 files changed

+22259
-3472
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ repos:
88
- id: end-of-file-fixer
99
exclude: ^playwright/drivers/browsers.json$
1010
- id: check-yaml
11-
- id: check-added-large-files
1211
- repo: https://github.com/psf/black
1312
rev: 19.10b0
1413
hooks:

api.json

Lines changed: 16493 additions & 0 deletions
Large diffs are not rendered by default.

driver/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"license": "Apache-2.0",
1515
"dependencies": {
16-
"playwright": "1.2.0-next.1596080705875"
16+
"playwright": "1.2.0-next.1596151449209"
1717
},
1818
"devDependencies": {
1919
"pkg": "^4.4.9"

playwright/accessibility.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
from playwright.connection import Channel
1818
from playwright.element_handle import ElementHandle
19+
from playwright.helper import locals_to_params
1920

2021

2122
def _ax_node_from_protocol(axNode: Dict[str, Any]) -> Dict[str, Any]:
@@ -58,10 +59,10 @@ def __init__(self, channel: Channel) -> None:
5859
self._loop = channel._connection._loop
5960

6061
async def snapshot(
61-
self, interestingOnly: bool = True, root: ElementHandle = None
62+
self, interestingOnly: bool = None, root: ElementHandle = None
6263
) -> Optional[Dict[str, Any]]:
63-
params = {"interestingOnly": interestingOnly}
64+
params = locals_to_params(locals())
6465
if root:
6566
params["root"] = root._channel
66-
result = await self._channel.send("accessibilitySnapshot", params,)
67+
result = await self._channel.send("accessibilitySnapshot", params)
6768
return _ax_node_from_protocol(result) if result else None

0 commit comments

Comments
 (0)