chore: Remove pyright in favor of pyrefly (#36154)

This commit is contained in:
chariri
2026-05-14 14:49:08 +09:00
committed by GitHub
parent b9e3130388
commit af4b9bfa8f
31 changed files with 87 additions and 181 deletions

View File

@@ -1,21 +0,0 @@
#!/bin/bash
set -x
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
cd "$SCRIPT_DIR/.."
# Get the path argument if provided
PATH_TO_CHECK="$1"
# Determine CPU core count based on OS
CPU_CORES=$(
if [[ "$(uname -s)" == "Darwin" ]]; then
sysctl -n hw.ncpu 2>/dev/null
else
nproc
fi
)
# Run basedpyright checks
uv run --directory api --dev -- basedpyright --threads "$CPU_CORES" $PATH_TO_CHECK

View File

@@ -8,6 +8,15 @@ cd "$REPO_ROOT"
EXCLUDES_FILE="api/pyrefly-local-excludes.txt"
target_paths=()
for target_path in "$@"; do
if [[ "$target_path" == api/* ]]; then
target_paths+=("${target_path#api/}")
else
target_paths+=("$target_path")
fi
done
pyrefly_args=(
"--summary=none"
"--use-ignore-files=false"
@@ -26,7 +35,7 @@ fi
tmp_output="$(mktemp)"
set +e
uv run --directory api --dev pyrefly check "${pyrefly_args[@]}" >"$tmp_output" 2>&1
uv run --directory api --dev pyrefly check "${pyrefly_args[@]}" "${target_paths[@]}" >"$tmp_output" 2>&1
pyrefly_status=$?
set -e

View File

@@ -17,5 +17,5 @@ uv run --directory api --dev ruff format ./
# run dotenv-linter linter
uv run --project api --dev dotenv-linter ./api/.env.example ./web/.env.example
# run basedpyright check
dev/basedpyright-check
# run pyrefly check
dev/pyrefly-check-local