mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
mach: Enable ANN rules (type annotations) for ruff Python linter (#38531)
This changes will introduce [flake8-annotations (ANN)](https://docs.astral.sh/ruff/rules/#flake8-annotations-ann) for python type annotation, this will make all thing related to function strictly typed in python This rule will start to affected this directory from now: - /python -> Root directory - /python/tidy - /python/wpt Testing: `./mach test-tidy` Fixes: Not related to any issues --------- Signed-off-by: Jerens Lensun <jerensslensun@gmail.com>
This commit is contained in:
parent
9c1ee4be83
commit
797db25c4e
13 changed files with 122 additions and 70 deletions
|
@ -32,7 +32,7 @@ import time
|
|||
import unittest
|
||||
|
||||
from functools import partial
|
||||
from typing import Any, Optional, Tuple, Type
|
||||
from typing import Any, Optional, Type
|
||||
from wsgiref.simple_server import WSGIRequestHandler, make_server
|
||||
|
||||
import flask
|
||||
|
@ -221,7 +221,7 @@ class TestApplyCommitsToWPT(unittest.TestCase):
|
|||
pull_request = SYNC.servo.get_pull_request(pr_number)
|
||||
step = CreateOrUpdateBranchForPRStep({"number": pr_number}, pull_request)
|
||||
|
||||
def get_applied_commits(num_commits: int, applied_commits: list[Tuple[str, str]]) -> None:
|
||||
def get_applied_commits(num_commits: int, applied_commits: list[tuple[str, str]]) -> None:
|
||||
assert SYNC is not None
|
||||
repo = SYNC.local_wpt_repo
|
||||
log = ["log", "--oneline", f"-{num_commits}"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue