Skip to content

Copier update: pyrefly strict - #63

Merged
ejfine merged 11 commits into
mainfrom
cop-pyrefly-strict
Sep 30, 2026
Merged

ejfine merged 11 commits into
mainfrom
cop-pyrefly-strict

Conversation

@ejfine

@ejfine ejfine commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Link to Issue or Message thread

Pulls in upstream LabAutomationAndScreening/copier-base-template#225

Why is this change necessary?

The upstream base template switched type checking from pyright to strict pyrefly. Instantiating this template with those settings (verified against aws-organization) produced 9 pyrefly errors in the generated src/ code, and the generated pyproject.toml still listed an unpinned pyright dependency because pyright_version no longer exists in the upstream context.

How does this change address the issue?

  • Copier update from the base template branch (pyrefly config, implicit-reexport handling for non-libraries, dependency floor bumps including ephemeral-pulumi-deploy>=0.0.8, and a new typing_extensions_version context value).
  • Remove pyright from template/pyproject.toml.jinja; add typing-extensions under the upstream-managed dependencies.
  • open-unpacking (5 errors): make CommonWorkloadKwargs a closed TypedDict (typing_extensions.TypedDict, closed=True, PEP 728) so unpacking it into AwsWorkload.__init__ is provably safe.
  • explicit-any in pulumi_deploy.py.jinja (2 errors): narrow the stack config to dict[str, str | ConfigValue].
  • explicit-any in account.py (2 errors): inline # pyrefly: ignore[explicit-any] on the SleepProvider.create/delete overrides, since their signatures must match pulumi's dynamic.ResourceProvider.
  • Fix the stale _commit in .config/.copier-answers.yml (it was left at v0.0.139 after the earlier base-template update, which made subsequent copier update runs replay already-applied diffs).

What side effects does this change have?

  • Generated repos no longer install pyright.
  • CommonWorkloadKwargs is closed: it can no longer be subclassed with extra keys, and an open TypedDict with the same keys isn't assignable to it. Nothing in the template does either.
  • typing-extensions becomes a direct dependency of generated repos.

How is this change tested?

Pulled through into aws-organization via copier update; pre-commit run -a passes there (pyrefly: 0 errors, 2 suppressed).

Other

Depends on LabAutomationAndScreening/copier-base-template#225 being merged and tagged; the answers file currently points at a dev version of that branch.

🤖 Generated with Claude Code

ejfine and others added 7 commits September 29, 2026 20:17
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copier update from base template pulls in typing_extensions_version
(plus starlette/kiota bumps); add typing-extensions as a dependency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 121 files, which is 21 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Repository: LabAutomationAndScreening/copier-aws-organization/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 7204cd1a-a6a5-4f64-8a2b-706726a0f62a

📥 Commits

Reviewing files that changed from the base of the PR and between 07e8a24 and 79deaaa.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (121)
  • .claude/.beads/config.yaml
  • .claude/commands/add-command.md
  • .claude/commands/commit.md
  • .claude/commands/create-adr.md
  • .claude/commands/create-issues.md
  • .claude/commands/gap.md
  • .claude/commands/green.md
  • .claude/commands/issue.md
  • .claude/commands/polish.md
  • .claude/commands/red.md
  • .claude/commands/refactor.md
  • .claude/commands/research.md
  • .claude/commands/simplify.md
  • .claude/commands/spike.md
  • .claude/commands/summarize.md
  • .claude/commands/tdd-review.md
  • .claude/commands/tdd.md
  • .claude/hooks/bash-chain-guard.js
  • .claude/settings/models.jsonc
  • .claude/settings/permissions/bash.jsonc
  • .claude/settings/permissions/edit.jsonc
  • .claude/skills/address-pr-comments/SKILL.md
  • .claude/skills/address-pr-comments/fetch-pr-comments.py
  • .coderabbit.yaml
  • .config/.copier-answers.yml
  • .config/.copier-managed-files.json
  • .config/.coveragerc
  • .config/_typos.toml
  • .config/pylintrc.toml
  • .config/pyrefly.toml
  • .config/ruff-non-src.toml
  • .config/ruff.toml
  • .config/taskfiles/copier-template.yaml
  • .devcontainer/devcontainer.json
  • .devcontainer/docker-compose.yml
  • .devcontainer/initialize-command.sh
  • .devcontainer/install-ci-tooling.py
  • .devcontainer/on-create-command.sh
  • .devcontainer/post-start-command.sh
  • .github/actions/install_deps/action.yml
  • .github/actions/update-devcontainer-hash/action.yml
  • .github/reusable_workflows/build-docker-image.yaml
  • .github/workflows/ci.yaml
  • .github/workflows/confirm-on-tagged-copier-template.yaml
  • .github/workflows/get-values.yaml
  • .github/workflows/hash_git_files.py
  • .github/workflows/pre-commit.yaml
  • .gitignore
  • .pre-commit-config.yaml
  • AGENTS.md
  • README.md
  • Taskfile.yaml
  • copier_template_resources/openapi_schema_simplifier.py
  • extensions/context.py
  • pyproject.toml
  • pyrightconfig.json
  • src/copier_tasks/copier_provenance.py
  • src/copier_tasks/remove_precommit_hooks.py
  • template/.claude/.beads/config.yaml
  • template/.claude/commands/add-command.md
  • template/.claude/commands/commit.md
  • template/.claude/commands/create-adr.md
  • template/.claude/commands/create-issues.md
  • template/.claude/commands/gap.md
  • template/.claude/commands/green.md
  • template/.claude/commands/issue.md
  • template/.claude/commands/polish.md
  • template/.claude/commands/red.md
  • template/.claude/commands/refactor.md
  • template/.claude/commands/research.md
  • template/.claude/commands/simplify.md
  • template/.claude/commands/spike.md
  • template/.claude/commands/summarize.md
  • template/.claude/commands/tdd-review.md
  • template/.claude/commands/tdd.md
  • template/.claude/hooks/bash-chain-guard.js
  • template/.claude/settings/models.jsonc
  • template/.claude/settings/permissions/bash.jsonc
  • template/.claude/settings/permissions/edit.jsonc
  • template/.claude/skills/address-pr-comments/SKILL.md
  • template/.claude/skills/address-pr-comments/fetch-pr-comments.py
  • template/.coderabbit.yaml
  • template/.config/.coveragerc
  • template/.config/_typos.toml
  • template/.config/pylintrc.toml
  • template/.config/pyrefly.toml
  • template/.config/ruff-non-src.toml
  • template/.config/ruff.toml
  • template/.config/taskfiles/copier-template.yaml
  • template/.devcontainer/devcontainer.json.jinja
  • template/.devcontainer/docker-compose.yml.jinja
  • template/.devcontainer/initialize-command.sh
  • template/.devcontainer/install-ci-tooling.py.jinja
  • template/.devcontainer/on-create-command.sh.jinja
  • template/.devcontainer/post-start-command.sh.jinja
  • template/.github/actions/comment_pull_request/action.yml
  • template/.github/actions/install_deps/action.yml
  • template/.github/actions/pulumi_ephemeral_deploy/action.yml
  • template/.github/actions/update-devcontainer-hash/action.yml
  • template/.github/workflows/ci.yaml.jinja
  • template/.github/workflows/confirm-on-tagged-copier-template.yaml
  • template/.github/workflows/get-values.yaml
  • template/.github/workflows/hash_git_files.py
  • template/.github/workflows/pre-commit.yaml
  • template/.github/workflows/pulumi-aws.yml
  • template/.gitignore
  • template/.pre-commit-config.yaml
  • template/AGENTS.md
  • template/README.md.jinja
  • template/Taskfile.yaml.jinja
  • template/pyproject.toml.jinja
  • template/pyrightconfig.json
  • template/src/aws_organization/lib/account.py
  • template/src/aws_organization/lib/central_infra_workload.py
  • template/src/aws_organization/lib/pulumi_deploy.py.jinja
  • template/src/aws_organization/lib/workload.py
  • tests/__init__.py
  • tests/conftest.py
  • tests/unit/copier_tasks/helpers.py
  • tests/unit/copier_tasks/test_copier_provenance.py
  • tests/unit/copier_tasks/test_remove_precommit_hooks.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

ejfine and others added 4 commits September 30, 2026 09:50
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ejfine
ejfine requested a review from zendern September 30, 2026 12:28
@ejfine
ejfine marked this pull request as ready for review September 30, 2026 12:28
@ejfine
ejfine merged commit 94fbedc into main Sep 30, 2026
19 checks passed
@ejfine
ejfine deleted the cop-pyrefly-strict branch September 30, 2026 12:37
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