servo/pyproject.toml
Jerens Lensun b05d265de5
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>
2025-08-01 04:34:24 +00:00

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",
]