mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
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>
53 lines
1 KiB
TOML
53 lines
1 KiB
TOML
[tool.ruff]
|
|
line-length = 120
|
|
extend-exclude = [
|
|
# temporary local files
|
|
"target/**",
|
|
"__pycache__/**",
|
|
"python/_venv*/**",
|
|
# upstream
|
|
"third_party/**",
|
|
"python/mach/**",
|
|
"components/**",
|
|
"tests/**",
|
|
]
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E",
|
|
"W",
|
|
"F",
|
|
]
|
|
ignore = [
|
|
# Trailing whitespace; the standard tidy process will enforce no trailing whitespace
|
|
"W291",
|
|
# 80 character line length; the standard tidy process will enforce line length
|
|
"E501",
|
|
]
|
|
|
|
[tool.pyrefly]
|
|
search-path = [
|
|
"python",
|
|
"tests/wpt/tests",
|
|
"tests/wpt/tests/tools",
|
|
"tests/wpt/tests/tools/wptrunner",
|
|
"tests/wpt/tests/tools/wptserve",
|
|
"python/mach",
|
|
"python/wpt",
|
|
"third_party/WebIDL",
|
|
"components/script_bindings/codegen",
|
|
]
|
|
project-includes = [
|
|
"python/**/*.py",
|
|
"components/script_bindings",
|
|
]
|
|
project-excludes = [
|
|
"**/venv/**",
|
|
"**/.venv/**",
|
|
"tests/wpt/tests/**",
|
|
"**/test.py",
|
|
"**/*_tests.py",
|
|
"**/tests/**",
|
|
"python/mach/**/*.py",
|
|
"python/servo/mutation/**/*.py",
|
|
]
|