Skip to content

Commit 6dd5aa2

Browse files
authored
chore: update pre-commit / linters (#2925)
1 parent cc27d25 commit 6dd5aa2

File tree

9 files changed

+11
-15
lines changed

9 files changed

+11
-15
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ repos:
1515
- id: check-executables-have-shebangs
1616
- id: check-merge-conflict
1717
- repo: https://github.com/psf/black
18-
rev: 24.8.0
18+
rev: 25.1.0
1919
hooks:
2020
- id: black
2121
- repo: https://github.com/pre-commit/mirrors-mypy
22-
rev: v1.11.2
22+
rev: v1.17.0
2323
hooks:
2424
- id: mypy
25-
additional_dependencies: [types-pyOpenSSL==24.1.0.20240722, types-requests==2.32.0.20240914]
25+
additional_dependencies: [types-pyOpenSSL==24.1.0.20240722, types-requests==2.32.4.20250611]
2626
- repo: https://github.com/pycqa/flake8
27-
rev: 7.1.1
27+
rev: 7.3.0
2828
hooks:
2929
- id: flake8
3030
- repo: https://github.com/pycqa/isort
31-
rev: 5.13.2
31+
rev: 6.0.1
3232
hooks:
3333
- id: isort
3434
- repo: local
@@ -39,7 +39,7 @@ repos:
3939
language: node
4040
pass_filenames: false
4141
types: [python]
42-
additional_dependencies: ["[email protected].384"]
42+
additional_dependencies: ["[email protected].403"]
4343
- repo: local
4444
hooks:
4545
- id: check-license-header

local-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ autobahn==23.1.2
22
black==25.1.0
33
build==1.2.2.post1
44
flake8==7.2.0
5-
mypy==1.16.0
5+
mypy==1.17.0
66
objgraph==3.6.2
77
Pillow==11.2.1
88
pixelmatch==0.3.0

playwright/_impl/_clock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async def set_system_time(
8989

9090

9191
def parse_time(
92-
time: Union[float, str, datetime.datetime]
92+
time: Union[float, str, datetime.datetime],
9393
) -> Dict[str, Union[int, str]]:
9494
if isinstance(time, (float, int)):
9595
return {"timeNumber": int(time * 1_000)}

playwright/_impl/_set_input_files_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ async def convert_input_files(
139139

140140

141141
def resolve_paths_and_directory_for_input_files(
142-
items: Sequence[Union[str, Path]]
142+
items: Sequence[Union[str, Path]],
143143
) -> Tuple[Optional[List[str]], Optional[str]]:
144144
local_paths: Optional[List[str]] = None
145145
local_directory: Optional[str] = None

tests/async/test_page.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ async def load() -> None:
662662

663663

664664
async def test_set_content_should_work_with_tricky_content(page: Page) -> None:
665-
await page.set_content("<div>hello world</div>" + "\x7F")
665+
await page.set_content("<div>hello world</div>" + "\x7f")
666666
assert await page.eval_on_selector("div", "div => div.textContent") == "hello world"
667667

668668

@@ -1403,7 +1403,6 @@ async def test_should_not_throw_when_continuing_after_page_is_closed(
14031403
async def handle_route(route: Route) -> None:
14041404
await page.close()
14051405
await route.continue_()
1406-
nonlocal done
14071406
done.set_result(True)
14081407

14091408
await page.route("**/*", handle_route)

tests/async/test_page_add_locator_handler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ async def test_should_work(page: Page, server: Server) -> None:
3030
original_locator = page.get_by_text("This interstitial covers the button")
3131

3232
async def handler(locator: Locator) -> None:
33-
nonlocal original_locator
3433
assert locator == original_locator
3534
nonlocal before_count
3635
nonlocal after_count

tests/async/test_worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,5 +199,5 @@ async def test_workers_should_format_number_using_context_locale(
199199
"() => new Worker(URL.createObjectURL(new Blob(['console.log(1)'], {type: 'application/javascript'})))"
200200
)
201201
worker = await worker_info.value
202-
assert await worker.evaluate("() => (10000.20).toLocaleString()") == "10\u00A0000,2"
202+
assert await worker.evaluate("() => (10000.20).toLocaleString()") == "10\u00a0000,2"
203203
await context.close()

tests/common/test_signals.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ async def main() -> None:
5050
page = await context.new_page()
5151
notified = False
5252
try:
53-
nonlocal sigint_received
5453
while not sigint_received:
5554
if not notified:
5655
wait_queue.put("ready")

tests/sync/test_page_add_locator_handler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def test_should_work(page: Page, server: Server) -> None:
2929
original_locator = page.get_by_text("This interstitial covers the button")
3030

3131
def handler(locator: Locator) -> None:
32-
nonlocal original_locator
3332
assert locator == original_locator
3433
nonlocal before_count
3534
nonlocal after_count

0 commit comments

Comments
 (0)