Skip to content

ci: type-check certora_autosetup in pyright#17

Merged
shellygr merged 4 commits into
masterfrom
shelly/typecheck-certora-autosetup
Jun 26, 2026
Merged

ci: type-check certora_autosetup in pyright#17
shellygr merged 4 commits into
masterfrom
shelly/typecheck-certora-autosetup

Conversation

@shellygr

Copy link
Copy Markdown
Contributor

certora_autosetup (imported from the AutoSetup repo in #2) wasn't covered by pyright — the existing run scopes only composer/analyzer/sanity_analyzer.

Change

  • Add pyrightconfig.autosetup.json — a dedicated profile for certora_autosetup at the basic bar it was written against in AutoSetup (reportMissingImports=none, the reportUnknown*/reportPrivateUsage=none overrides it originally used).
  • Add a second pyright -p pyrightconfig.autosetup.json step in pyright.yml.

Why a separate profile

Folding certora_autosetup into the main (standard) pyrightconfig.json produces 53 errors: 36 are now-redundant # type: ignore comments (the suppressed imports resolve here, so they read as "unnecessary"), plus 17 pre-existing findings (15 reportPossiblyUnboundVariable, 2 reportIncompatibleMethodOverride). Rather than refactor 53 sites in freshly-migrated code, this checks it at its origin bar. Tightening to the full standard profile is a possible later follow-up. The main pyrightconfig.json (composer/analyzer/sanity_analyzer strict) is unchanged.

No pyproject.toml/uv.lock change → lockfile-check and pin-sync unaffected.

Verification

Local: pyright composer/ analyzer sanity_analyzer → 0 errors (unchanged); pyright -p pyrightconfig.autosetup.json → 0 errors.

🤖 Generated with Claude Code

shellygr and others added 2 commits June 25, 2026 20:15
certora_autosetup (imported from the AutoSetup repo) wasn't covered by pyright —
the existing run scopes only composer/analyzer/sanity_analyzer. Add it via a
dedicated pyrightconfig.autosetup.json at the basic bar it was written against in
AutoSetup, run as a second pyright step. Kept separate so it need not meet the
composer/analyzer standard profile (which would flag 36 now-redundant
# type: ignore comments plus 17 pre-existing findings). The main pyrightconfig.json
is unchanged.

No pyproject/uv.lock change — lockfile-check and pin-sync unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replaces the separate lenient pyrightconfig.autosetup.json (basic mode) with
folding certora_autosetup into the main standard pyright scope, and fixes the 17
findings it surfaced:

- 2 reportIncompatibleMethodOverride: base ProverRunner.submit_jobs was annotated
  List[SubmissionResult | BaseException], but both impls convert exceptions to
  SubmissionResult and return List[SubmissionResult] (and the base body is
  abstract with no callers). Narrow the base annotation to List[SubmissionResult]
  — matches the docstring and the implementations.
- 15 reportPossiblyUnboundVariable: initialize/hoist each local before the branch
  or loop it's read after (desc_text, config_type, contract_name, current_stripped,
  enum_members/struct_members, fs/cache_file, output, contracts_added, output_idx).
  No behavioral change on the real paths — the inits just make boundness provable.

pyright.yml now runs `pyright composer/ analyzer sanity_analyzer certora_autosetup`;
pyrightconfig.json includes certora_autosetup. No pyproject/uv.lock change.

Verified: full-scope pyright 0 errors; AutoSetup's 450 unit tests pass against the
modified package.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@jtoman jtoman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

stamping the pyright config stuff, I'll leave the autosetup stuff to those with more context.

Comment thread pyrightconfig.json Outdated
@@ -1,5 +1,5 @@
{
"include": ["composer", "analyzer"],
"include": ["composer", "analyzer", "certora_autosetup"],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sanity_analyzer too while we're here.

@shellygr shellygr merged commit 9bd6725 into master Jun 26, 2026
2 checks passed
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