Skip to content

Copier update: fully remove pyright - #101

Merged
ejfine merged 2 commits into
mainfrom
cop-no-pyright
Aug 12, 2026
Merged

ejfine merged 2 commits into
mainfrom
cop-no-pyright

Conversation

@ejfine

@ejfine ejfine commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Pull in upstream template changes

Tested in downstream repo

Summary by CodeRabbit

  • New Features

    • Added support for configuring available Claude model variants.
    • Added permission for the xxd command.
    • Added container linting checks for Dockerfiles.
  • Bug Fixes

    • Improved Bash command safety checks, including clearer detection of chained and background commands.
    • Improved handling of UTF-8 output from command-line integrations.
    • Normalized line endings for more consistent file verification.
  • Chores

    • Updated development tools, extensions, dependencies, and template configuration.
    • Replaced Pyright with Pyrefly for Python type checking.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR updates Claude command validation, migrates project checks from Pyright to Pyrefly, refreshes development tooling, synchronizes Copier template files, and adds shared pytest configuration.

Changes

Tooling and template maintenance

Layer / File(s) Summary
Claude command controls and settings
.claude/..., template/.claude/...
Claude hooks distinguish command chaining from background execution. Quoted, escaped, and redirection operators receive dedicated handling. Model settings, xxd permissions, and UTF-8 GitHub CLI output are added in both repository and template configurations.
Pyrefly migration and checks
.pre-commit-config.yaml, template/.pre-commit-config.yaml, pyproject.toml, template/pyproject.toml.jinja, AGENTS.md, template/AGENTS.md, .config/..., template/.config/..., copier_template_resources/vcrpy_fixtures.py
Pyright configuration and dependencies are removed. Pre-commit uses Pyrefly and pinned Hadolint. Guidance, coverage comments, Ruff settings, and VCR fixtures are updated.
Template, environment, and test synchronization
.config/.copier-*, extensions/context.py, .devcontainer/..., template/.devcontainer/..., .github/workflows/..., template/.github/workflows/..., tests/..., template/tests/...
Copier metadata, tool versions, editor extensions, Prettier paths, and file hashing are updated. Shared pytest files are added and linked into the template.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 27.27% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description only states that upstream changes were pulled in and tested downstream; it omits the required issue, rationale, implementation, side effects, and testing details. Complete all required template sections with the issue reference, rationale, implementation details, side effects, and specific test results.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the primary change: removing Pyright from the Copier template.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/hooks/bash-chain-guard.js:
- Line 11: Update CHAIN_OPERATORS in both .claude/hooks/bash-chain-guard.js
lines 11-11 and template/.claude/hooks/bash-chain-guard.js lines 11-11 to match
unquoted newline command separators in addition to &&, ||, and semicolons, while
continuing to allow a single pipe character.
- Line 12: Update BACKGROUND_AMPERSAND in both .claude/hooks/bash-chain-guard.js
(lines 12-12) and template/.claude/hooks/bash-chain-guard.js (lines 12-12) to
exclude a preceding pipe, using the requested (?<![<>|])&(?!>) pattern so valid
|& pipelines are not matched.
- Around line 3-16: Make the guard shell-aware in both
.claude/hooks/bash-chain-guard.js (lines 3-16) and
template/.claude/hooks/bash-chain-guard.js (lines 3-16): update the parsing used
by stripQuotedAndEscaped and the operator checks so command substitutions and
quoted sh -c bodies cannot hide chained commands, unquoted newlines are rejected
as separators, and |& is treated consistently with the allowed pipeline policy.
Apply the same behavior in both copies.

In @.config/.copier-managed-files.json:
- Line 36: Review the changes to the listed Copier-managed paths and identify
which are generic rather than repository-specific. Backport those generic
changes to the authoritative
gh:LabAutomationAndScreening/copier-base-template.git, and leave
.config/.copier-managed-files.json unchanged because it is auto-generated.

In @.github/workflows/hash_git_files.py:
- Around line 99-100: Restore bounded chunked checksum reads in the regular-file
and extra_paths handling of .github/workflows/hash_git_files.py at lines 99-100
and 105-107, preserving CRLF-to-LF normalization without loading entire files
into memory. Apply the same streaming changes in
template/.github/workflows/hash_git_files.py at lines 99-100 and 105-107.
- Around line 99-100: Update both implementations of the file hashing logic to
normalize CRLF only for Git-classified text files, preserving raw bytes for
binary files. Apply this consistently to tracked-file hashing and extra_paths in
.github/workflows/hash_git_files.py at lines 99-100 and 105-107, and mirror the
same changes in template/.github/workflows/hash_git_files.py at lines 99-100 and
105-107, using Git text attributes or normalized Git blobs for classification.

In `@AGENTS.md`:
- Line 54: In AGENTS.md at line 54 and template/AGENTS.md at line 54, restore
the behavioral-assert guidance as its own bullet: keep behavioral assert
statements inside test functions, never ordinary helpers or fixtures. Add the
pytest keyword-only exception as a separate bullet below it, preserving both
rules in each file.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3765fbf9-a2a2-4603-ba47-2ade97909627

📥 Commits

Reviewing files that changed from the base of the PR and between f824441 and 60f4861.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (37)
  • .claude/hooks/bash-chain-guard.js
  • .claude/settings/models.jsonc
  • .claude/settings/permissions/bash.jsonc
  • .claude/skills/address-pr-comments/fetch-pr-comments.py
  • .coderabbit.yaml
  • .config/.copier-answers.yml
  • .config/.copier-managed-files.json
  • .config/.coveragerc
  • .config/pyrefly.toml
  • .config/ruff.toml
  • .devcontainer/devcontainer.json
  • .devcontainer/install-ci-tooling.py
  • .github/workflows/hash_git_files.py
  • .pre-commit-config.yaml
  • AGENTS.md
  • copier_template_resources/vcrpy_fixtures.py
  • extensions/context.py
  • pyproject.toml
  • pyrightconfig.json
  • template/.claude/hooks/bash-chain-guard.js
  • template/.claude/settings/models.jsonc
  • template/.claude/settings/permissions/bash.jsonc
  • template/.claude/skills/address-pr-comments/fetch-pr-comments.py
  • template/.coderabbit.yaml
  • template/.config/.coveragerc
  • template/.config/pyrefly.toml
  • template/.config/ruff.toml
  • template/.devcontainer/devcontainer.json.jinja
  • template/.github/workflows/hash_git_files.py
  • template/.pre-commit-config.yaml
  • template/AGENTS.md
  • template/pyproject.toml.jinja
  • template/pyrightconfig.json
  • template/tests/__init__.py
  • template/tests/conftest.py
  • tests/__init__.py
  • tests/conftest.py
💤 Files with no reviewable changes (3)
  • template/pyproject.toml.jinja
  • template/pyrightconfig.json
  • pyrightconfig.json

Comment thread .claude/hooks/bash-chain-guard.js
Comment thread .claude/hooks/bash-chain-guard.js
Comment thread .claude/hooks/bash-chain-guard.js
Comment thread .config/.copier-managed-files.json
Comment thread .github/workflows/hash_git_files.py
Comment thread AGENTS.md
@ejfine
ejfine marked this pull request as ready for review August 12, 2026 16:00
@ejfine
ejfine requested a review from idonaldson August 12, 2026 16:00
@ejfine
ejfine merged commit 699817b into main Aug 12, 2026
27 checks passed
@ejfine
ejfine deleted the cop-no-pyright branch August 12, 2026 18:02
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