feat: add pyright script for type checking with configuration#1123
feat: add pyright script for type checking with configuration#1123JithinBathula wants to merge 3 commits intographistry:masterfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5842d1e6dd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 16c3f4e261
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| elif command -v uvx >/dev/null 2>&1; then | ||
| PYRIGHT_CMD_ARR=(uvx --from pyright pyright) | ||
| elif command -v npx >/dev/null 2>&1; then | ||
| PYRIGHT_CMD_ARR=(npx pyright) |
There was a problem hiding this comment.
Fall through to next backend when uvx invocation fails
Selecting the backend solely by command -v means the script commits to uvx whenever it is installed, and with set -e it exits on the first uvx failure without ever trying npx. This breaks type-check runs in environments where uvx is present but cannot execute pyright (for example, restricted package access) while npx pyright is still usable, so the intended fallback chain is not actually resilient.
Useful? React with 👍 / 👎.
|
The autocomment on flipping precedence order seems right, it'd match the other shell scripts here. Can you change? Thanks! |
lmeyerov
left a comment
There was a problem hiding this comment.
Thanks! See #1123 (comment) and then we can merge
|
@codex I agree with your review below, please address
|
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex address that feedback |
|
To use Codex here, create an environment for this repo. |
|
Updated the script based on the comment. Thanks |
Summary
Adds pyright configuration and local runner script to catch conditionally-assigned variable bugs (like edge_map at hop.py:974) that ruff and mypy miss. No code changes — tooling only.
Non-goals: CI integration, code fixes, rule enforcement — all follow-up PRs.
Validation
bin/pyright.sh graphistry/compute/hop.pyconfirmshop.py:974:122 - warning: "edge_map" is possibly unboundCypher Frontend CI Evidence (when PR touches cypher frontend / IR scope)
cypher-frontend-strict-typing (py3.12)passed (strict typing gate)cypher-frontend-differential-parity (py3.12)passed (trust-but-verify gate)cypher-frontend-ci-gatespassed (includestest-minimal-pythonsentinel)