Files
oh-my-pi/crates/pi-shell/src/minimizer/defs/basedpyright.toml
T
can1357 41710a0a5f feat(cross-cutting): added pi-ast/pi-shell crates and rewired pi-natives
- Added `pi-ast` as a new crate with public `language`, `ops`, and `summary` modules and exported `SupportLang`.
- Added AST summary and rewrite APIs in `pi-ast`, including language inference, overlap-safe edits, and span normalization.
- Added `pi-shell` crate with new `Shell` and cross-platform `Process` APIs, session execution, and cancellation-aware runs.
- Updated `pi-natives` to use shared `pi_ast`/`pi_shell` APIs, switched to local path deps, and moved minimizer assets to `pi-shell`.
2026-05-11 03:43:58 +02:00

51 lines
1.7 KiB
TOML

# Ported from https://github.com/rtk-ai/rtk/blob/master/src/filters/basedpyright.toml
# match_command adapted for the local (program, subcommand) dispatch model.
[filters.basedpyright]
description = "Compact basedpyright type checker output — strip blank lines, keep errors"
match_command = "^basedpyright$"
strip_ansi = true
strip_lines_matching = [
"^\\s*$",
"^Searching for source files",
"^Found \\d+ source file",
"^Pyright \\d+\\.\\d+",
"^basedpyright \\d+\\.\\d+",
]
max_lines = 50
on_empty = "basedpyright: ok"
[[tests.basedpyright]]
name = "strips noise, keeps errors and summary"
input = """
basedpyright 1.22.0
Searching for source files
Found 42 source files
/home/user/app/main.py
/home/user/app/main.py:10:5 - error: "foo" is not defined (reportUndefinedVariable)
/home/user/app/main.py:25:1 - error: Type "str" is not assignable to type "int" (reportAssignmentType)
/home/user/app/utils.py
/home/user/app/utils.py:8:9 - warning: Variable "x" is not accessed (reportUnusedVariable)
3 errors, 1 warning, 0 informations
"""
expected = "/home/user/app/main.py\n /home/user/app/main.py:10:5 - error: \"foo\" is not defined (reportUndefinedVariable)\n /home/user/app/main.py:25:1 - error: Type \"str\" is not assignable to type \"int\" (reportAssignmentType)\n/home/user/app/utils.py\n /home/user/app/utils.py:8:9 - warning: Variable \"x\" is not accessed (reportUnusedVariable)\n3 errors, 1 warning, 0 informations\n"
[[tests.basedpyright]]
name = "clean output"
input = """
basedpyright 1.22.0
Searching for source files
Found 10 source files
0 errors, 0 warnings, 0 informations
"""
expected = "0 errors, 0 warnings, 0 informations\n"
[[tests.basedpyright]]
name = "empty input returns on_empty message"
input = ""
expected = "basedpyright: ok"