Skip to content

Commit 385cd69

Browse files
authored
chore: bump PyPi dependencies (#206)
1 parent fd3f33f commit 385cd69

32 files changed

+281
-112
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v3.1.0
5+
rev: v3.2.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
exclude: ^playwright/drivers/browsers.json$
1010
- id: check-yaml
1111
- repo: https://github.com/psf/black
12-
rev: 19.10b0
12+
rev: 20.8b1
1313
hooks:
1414
- id: black
1515
- repo: https://github.com/pre-commit/mirrors-mypy
1616
rev: v0.782
1717
hooks:
1818
- id: mypy
1919
- repo: https://gitlab.com/pycqa/flake8
20-
rev: 'a7be77f761a4c29121d6bb6f61c11902281f9105'
20+
rev: '3.8.3'
2121
hooks:
2222
- id: flake8
2323
- repo: https://github.com/pre-commit/mirrors-isort
24-
rev: v5.1.3
24+
rev: v5.5.4
2525
hooks:
2626
- id: isort

build_driver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
node_modules_playwright = driver_path / "node_modules" / "playwright"
4444

4545
shutil.copyfile(
46-
node_modules_playwright / "browsers.json", drivers_path / "browsers.json",
46+
node_modules_playwright / "browsers.json",
47+
drivers_path / "browsers.json",
4748
)
4849

4950
upstream_readme = (node_modules_playwright / "README.md").read_text()

local-requirements.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
pytest==5.4.3
1+
pytest==6.1.0
22
pytest-asyncio==0.14.0
3-
pytest-cov==2.10.0
3+
pytest-cov==2.10.1
44
pytest-sugar==0.9.4
5-
pytest-xdist==1.33.0
5+
pytest-xdist==2.1.0
66
pytest-timeout==1.4.2
77
pixelmatch==0.2.1
88
Pillow==7.2.0
99
mypy==0.782
10-
setuptools==49.1.0
10+
setuptools==50.3.0
1111
twisted==20.3.0
12-
wheel==0.34.2
13-
black==19.10b0
14-
pre-commit==2.6.0
12+
wheel==0.35.1
13+
black==20.8b1
14+
pre-commit==2.7.1
1515
flake8==3.8.3
1616
twine==3.2.0
1717
pyOpenSSL==19.1.0

playwright/async_api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3042,8 +3042,7 @@ async def accept(self, promptText: str = None) -> NoneType:
30423042
)
30433043

30443044
async def dismiss(self) -> NoneType:
3045-
"""Dialog.dismiss
3046-
"""
3045+
"""Dialog.dismiss"""
30473046
return mapping.from_maybe_impl(await self._impl_obj.dismiss())
30483047

30493048

playwright/browser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939

4040
class Browser(ChannelOwner):
4141

42-
Events = SimpleNamespace(Disconnected="disconnected",)
42+
Events = SimpleNamespace(
43+
Disconnected="disconnected",
44+
)
4345

4446
def __init__(
4547
self, parent: "BrowserType", type: str, guid: str, initializer: Dict

playwright/browser_context.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@
4141

4242
class BrowserContext(ChannelOwner):
4343

44-
Events = SimpleNamespace(Close="close", Page="page",)
44+
Events = SimpleNamespace(
45+
Close="close",
46+
Page="page",
47+
)
4548

4649
def __init__(
4750
self, parent: ChannelOwner, type: str, guid: str, initializer: Dict
@@ -219,11 +222,16 @@ async def close(self) -> None:
219222
await self._channel.send("close")
220223

221224
def expect_event(
222-
self, event: str, predicate: Callable[[Any], bool] = None, timeout: int = None,
225+
self,
226+
event: str,
227+
predicate: Callable[[Any], bool] = None,
228+
timeout: int = None,
223229
) -> EventContextManagerImpl:
224230
return EventContextManagerImpl(self.waitForEvent(event, predicate, timeout))
225231

226232
def expect_page(
227-
self, predicate: Callable[[Page], bool] = None, timeout: int = None,
233+
self,
234+
predicate: Callable[[Page], bool] = None,
235+
timeout: int = None,
228236
) -> EventContextManagerImpl[Page]:
229237
return EventContextManagerImpl(self.waitForEvent("page", predicate, timeout))

playwright/chromium_browser_context.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
class ChromiumBrowserContext(BrowserContext):
2525

2626
Events = SimpleNamespace(
27-
BackgroundPage="backgroundpage", ServiceWorker="serviceworker",
27+
BackgroundPage="backgroundpage",
28+
ServiceWorker="serviceworker",
2829
)
2930

3031
def __init__(

playwright/connection.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ def __init__(
6666
self._loop: asyncio.AbstractEventLoop = parent._loop
6767
self._type = type
6868
self._guid = guid
69-
self._connection: Connection = parent._connection if isinstance(
70-
parent, ChannelOwner
71-
) else parent
72-
self._parent: Optional[ChannelOwner] = parent if isinstance(
73-
parent, ChannelOwner
74-
) else None
69+
self._connection: Connection = (
70+
parent._connection if isinstance(parent, ChannelOwner) else parent
71+
)
72+
self._parent: Optional[ChannelOwner] = (
73+
parent if isinstance(parent, ChannelOwner) else None
74+
)
7575
self._objects: Dict[str, "ChannelOwner"] = {}
7676
self._channel = Channel(self._connection, guid)
7777
self._channel._object = self

playwright/frame.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ def __init__(
7979
lambda params: self._on_load_state(params.get("add"), params.get("remove")),
8080
)
8181
self._channel.on(
82-
"navigated", lambda params: self._on_frame_navigated(params),
82+
"navigated",
83+
lambda params: self._on_frame_navigated(params),
8384
)
8485

8586
def _on_load_state(
@@ -156,7 +157,9 @@ def predicate(event: Any) -> bool:
156157
return not matcher or matcher.matches(event["url"])
157158

158159
event = await wait_helper.wait_for_event(
159-
self._event_emitter, "navigated", predicate=predicate,
160+
self._event_emitter,
161+
"navigated",
162+
predicate=predicate,
160163
)
161164
if "error" in event:
162165
raise Error(event["error"])
@@ -293,7 +296,10 @@ async def content(self) -> str:
293296
return await self._channel.send("content")
294297

295298
async def setContent(
296-
self, html: str, timeout: int = None, waitUntil: DocumentLoadState = None,
299+
self,
300+
html: str,
301+
timeout: int = None,
302+
waitUntil: DocumentLoadState = None,
297303
) -> None:
298304
await self._channel.send("setContent", locals_to_params(locals()))
299305

@@ -484,7 +490,9 @@ async def title(self) -> str:
484490
return await self._channel.send("title")
485491

486492
def expect_load_state(
487-
self, state: DocumentLoadState = None, timeout: int = None,
493+
self,
494+
state: DocumentLoadState = None,
495+
timeout: int = None,
488496
) -> EventContextManagerImpl[Optional[Response]]:
489497
return EventContextManagerImpl(self.waitForLoadState(state, timeout))
490498

playwright/input.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,18 @@ def __init__(self, channel: Channel) -> None:
4545
async def move(self, x: float, y: float, steps: int = None) -> None:
4646
await self._channel.send("mouseMove", locals_to_params(locals()))
4747

48-
async def down(self, button: MouseButton = None, clickCount: int = None,) -> None:
48+
async def down(
49+
self,
50+
button: MouseButton = None,
51+
clickCount: int = None,
52+
) -> None:
4953
await self._channel.send("mouseDown", locals_to_params(locals()))
5054

51-
async def up(self, button: MouseButton = None, clickCount: int = None,) -> None:
55+
async def up(
56+
self,
57+
button: MouseButton = None,
58+
clickCount: int = None,
59+
) -> None:
5260
await self._channel.send("mouseUp", locals_to_params(locals()))
5361

5462
async def click(
@@ -62,6 +70,10 @@ async def click(
6270
await self._channel.send("mouseClick", locals_to_params(locals()))
6371

6472
async def dblclick(
65-
self, x: float, y: float, delay: int = None, button: MouseButton = None,
73+
self,
74+
x: float,
75+
y: float,
76+
delay: int = None,
77+
button: MouseButton = None,
6678
) -> None:
6779
await self.click(x, y, delay=delay, button=button, clickCount=2)

playwright/page.py

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,10 @@ async def content(self) -> str:
396396
return await self._main_frame.content()
397397

398398
async def setContent(
399-
self, html: str, timeout: int = None, waitUntil: DocumentLoadState = None,
399+
self,
400+
html: str,
401+
timeout: int = None,
402+
waitUntil: DocumentLoadState = None,
400403
) -> None:
401404
return await self._main_frame.setContent(**locals_to_params(locals()))
402405

@@ -410,7 +413,9 @@ async def goto(
410413
return await self._main_frame.goto(**locals_to_params(locals()))
411414

412415
async def reload(
413-
self, timeout: int = None, waitUntil: DocumentLoadState = None,
416+
self,
417+
timeout: int = None,
418+
waitUntil: DocumentLoadState = None,
414419
) -> Optional[Response]:
415420
return from_nullable_channel(
416421
await self._channel.send("reload", locals_to_params(locals()))
@@ -489,21 +494,27 @@ async def waitForEvent(
489494
return await wait_helper.wait_for_event(self, event, predicate)
490495

491496
async def goBack(
492-
self, timeout: int = None, waitUntil: DocumentLoadState = None,
497+
self,
498+
timeout: int = None,
499+
waitUntil: DocumentLoadState = None,
493500
) -> Optional[Response]:
494501
return from_nullable_channel(
495502
await self._channel.send("goBack", locals_to_params(locals()))
496503
)
497504

498505
async def goForward(
499-
self, timeout: int = None, waitUntil: DocumentLoadState = None,
506+
self,
507+
timeout: int = None,
508+
waitUntil: DocumentLoadState = None,
500509
) -> Optional[Response]:
501510
return from_nullable_channel(
502511
await self._channel.send("goForward", locals_to_params(locals()))
503512
)
504513

505514
async def emulateMedia(
506-
self, media: Literal["print", "screen"] = None, colorScheme: ColorScheme = None,
515+
self,
516+
media: Literal["print", "screen"] = None,
517+
colorScheme: ColorScheme = None,
507518
) -> None:
508519
await self._channel.send("emulateMedia", locals_to_params(locals()))
509520

@@ -760,36 +771,49 @@ async def pdf(
760771
return decoded_binary
761772

762773
def expect_event(
763-
self, event: str, predicate: Callable[[Any], bool] = None, timeout: int = None,
774+
self,
775+
event: str,
776+
predicate: Callable[[Any], bool] = None,
777+
timeout: int = None,
764778
) -> EventContextManagerImpl:
765779
return EventContextManagerImpl(self.waitForEvent(event, predicate, timeout))
766780

767781
def expect_console_message(
768-
self, predicate: Callable[[ConsoleMessage], bool] = None, timeout: int = None,
782+
self,
783+
predicate: Callable[[ConsoleMessage], bool] = None,
784+
timeout: int = None,
769785
) -> EventContextManagerImpl[ConsoleMessage]:
770786
return EventContextManagerImpl(self.waitForEvent("console", predicate, timeout))
771787

772788
def expect_dialog(
773-
self, predicate: Callable[[Dialog], bool] = None, timeout: int = None,
789+
self,
790+
predicate: Callable[[Dialog], bool] = None,
791+
timeout: int = None,
774792
) -> EventContextManagerImpl[Dialog]:
775793
return EventContextManagerImpl(self.waitForEvent("dialog", predicate, timeout))
776794

777795
def expect_download(
778-
self, predicate: Callable[[Download], bool] = None, timeout: int = None,
796+
self,
797+
predicate: Callable[[Download], bool] = None,
798+
timeout: int = None,
779799
) -> EventContextManagerImpl[Download]:
780800
return EventContextManagerImpl(
781801
self.waitForEvent("download", predicate, timeout)
782802
)
783803

784804
def expect_file_chooser(
785-
self, predicate: Callable[[FileChooser], bool] = None, timeout: int = None,
805+
self,
806+
predicate: Callable[[FileChooser], bool] = None,
807+
timeout: int = None,
786808
) -> EventContextManagerImpl[FileChooser]:
787809
return EventContextManagerImpl(
788810
self.waitForEvent("filechooser", predicate, timeout)
789811
)
790812

791813
def expect_load_state(
792-
self, state: DocumentLoadState = None, timeout: int = None,
814+
self,
815+
state: DocumentLoadState = None,
816+
timeout: int = None,
793817
) -> EventContextManagerImpl[Optional[Response]]:
794818
return EventContextManagerImpl(self.waitForLoadState(state, timeout))
795819

@@ -802,7 +826,9 @@ def expect_navigation(
802826
return EventContextManagerImpl(self.waitForNavigation(url, waitUntil, timeout))
803827

804828
def expect_popup(
805-
self, predicate: Callable[["Page"], bool] = None, timeout: int = None,
829+
self,
830+
predicate: Callable[["Page"], bool] = None,
831+
timeout: int = None,
806832
) -> EventContextManagerImpl["Page"]:
807833
return EventContextManagerImpl(self.waitForEvent("popup", predicate, timeout))
808834

@@ -823,7 +849,9 @@ def expect_response(
823849
return EventContextManagerImpl(self.waitForResponse(url, predicate, timeout))
824850

825851
def expect_worker(
826-
self, predicate: Callable[["Worker"], bool] = None, timeout: int = None,
852+
self,
853+
predicate: Callable[["Worker"], bool] = None,
854+
timeout: int = None,
827855
) -> EventContextManagerImpl["Worker"]:
828856
return EventContextManagerImpl(self.waitForEvent("worker", predicate, timeout))
829857

playwright/sync_api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3170,8 +3170,7 @@ def accept(self, promptText: str = None) -> NoneType:
31703170
)
31713171

31723172
def dismiss(self) -> NoneType:
3173-
"""Dialog.dismiss
3174-
"""
3173+
"""Dialog.dismiss"""
31753174
return mapping.from_maybe_impl(self._sync(self._impl_obj.dismiss()))
31763175

31773176

scripts/documentation_provider.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ def compare_types(self, value: Any, doc_value: Any, fqname: str) -> None:
193193
return
194194
code_type = self.serialize_python_type(value)
195195
doc_type = self.serialize_doc_type(
196-
doc_value["type"]["name"], fqname, doc_value["type"],
196+
doc_value["type"]["name"],
197+
fqname,
198+
doc_value["type"],
197199
)
198200
if not doc_value["required"]:
199201
doc_type = self.make_optional(doc_type)

scripts/report_downstream_test_diffs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ def pytest_test_cases() -> typing.Generator[TestCase, None, None]:
2626
matches = re.finditer(regex, p.stdout.decode(), re.MULTILINE)
2727
for match in matches:
2828
yield TestCase(
29-
match.group("api"), match.group("file"), match.group("test"),
29+
match.group("api"),
30+
match.group("file"),
31+
match.group("test"),
3032
)
3133

3234

tests/async/test_accessibility.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ async def test_accessibility_filtering_children_of_leaf_nodes_rich_text_editable
203203
# WebKit rich text accessibility is iffy
204204
@pytest.mark.skip_browser("webkit")
205205
async def test_accessibility_filtering_children_of_leaf_nodes_rich_text_editable_fields_with_role_should_have_children(
206-
page, is_firefox,
206+
page,
207+
is_firefox,
207208
):
208209
await page.setContent(
209210
"""

0 commit comments

Comments
 (0)