Skip to content

feat: add pyright script for type checking with configuration#1123

Open
JithinBathula wants to merge 3 commits intographistry:masterfrom
JithinBathula:pyright-local-runner
Open

feat: add pyright script for type checking with configuration#1123
JithinBathula wants to merge 3 commits intographistry:masterfrom
JithinBathula:pyright-local-runner

Conversation

@JithinBathula
Copy link
Copy Markdown

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

  • Local lint/type/tests run for touched scope
  • CI is green

bin/pyright.sh graphistry/compute/hop.py confirms hop.py:974:122 - warning: "edge_map" is possibly unbound

Cypher 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-gates passed (includes test-minimal-python sentinel)
  • PR body includes links/screenshots/log snippets for any non-obvious gate evidence

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread bin/pyright.sh Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread bin/pyright.sh Outdated
Comment on lines +10 to +13
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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@lmeyerov
Copy link
Copy Markdown
Contributor

The autocomment on flipping precedence order seems right, it'd match the other shell scripts here. Can you change? Thanks!

Copy link
Copy Markdown
Contributor

@lmeyerov lmeyerov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! See #1123 (comment) and then we can merge

@lmeyerov
Copy link
Copy Markdown
Contributor

@codex I agree with your review below, please address

P2 Badge 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.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

ℹ️ 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".

@lmeyerov
Copy link
Copy Markdown
Contributor

@codex address that feedback

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

@JithinBathula JithinBathula requested a review from lmeyerov April 13, 2026 04:03
@JithinBathula
Copy link
Copy Markdown
Author

Updated the script based on the comment. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants