mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
script_binding: Add type check on servo script bindings (#38161)
Introduce type checking with Pyrefly in `components/script_bindings` This commit adds Pyrefly-based type checking to the `components/script_bindings` directory. The primary goal is to catch type inconsistencies early and reduce the likelihood of unexpected runtime errors. This change affects the `webidl` component, as these script bindings are responsible for connecting WebIDL specifications to the Rust codebase. Testing: `./mach test-wpt webidl` Fixes: *Link to an issue this pull requests fixes or remove this line if there is no issue* --------- Signed-off-by: Jerens Lensun <jerensslensun@gmail.com>
This commit is contained in:
parent
4ce5b17605
commit
b05d265de5
7 changed files with 176 additions and 88 deletions
3
third_party/WebIDL/WebIDL.py
vendored
3
third_party/WebIDL/WebIDL.py
vendored
|
@ -12,6 +12,7 @@ import string
|
|||
import traceback
|
||||
from collections import OrderedDict, defaultdict
|
||||
from itertools import chain
|
||||
from typing import Any
|
||||
|
||||
from ply import lex, yacc
|
||||
|
||||
|
@ -2522,7 +2523,7 @@ class IDLEnum(IDLObjectWithIdentifier):
|
|||
|
||||
|
||||
class IDLType(IDLObject):
|
||||
Tags = enum(
|
||||
Tags: Any = enum(
|
||||
# The integer types
|
||||
"int8",
|
||||
"uint8",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue