Skip to content

Remove mypy ignore_errors from CLI modules (#68 follow-up)#77

Merged
wpak-ai merged 1 commit into
developfrom
fix/cli-mypy-strict
Jul 10, 2026
Merged

Remove mypy ignore_errors from CLI modules (#68 follow-up)#77
wpak-ai merged 1 commit into
developfrom
fix/cli-mypy-strict

Conversation

@bradjin8

@bradjin8 bradjin8 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #76 .

Changes

Area What
pyproject.toml Delete CLI [[tool.mypy.overrides]] block; strict mypy now covers all localci packages
click_options.py Apply click.pass_context outside the options list
status.py dict[str, Any]; _safe_float uses isinstance narrowing
config.py dict[str, Any] for YAML load
logs.py _find_jobJobResult | None
patcher.py PriorityJobQueue param on _print_execution_plan
analyze.py / list.py Import WorkflowError from localci.errors
run_flow.py Exception imports from localci.errors; Workflow/JobExecutor types; safe registry_path check
container.py resolve_cache_paths_fn: Callable[..., ResolvedCachePaths | None]

Test plan

  • cd cli && mypy localci/ — 48 files, 0 errors
  • cd cli && pytest tests/ — 595 passed
  • pre-commit run -a — all hooks green

Summary by CodeRabbit

  • Bug Fixes
    • Improved command robustness across workflow, run, status, logs, and config commands.
    • Status output now handles invalid boolean values more safely.
    • Run-related command setup and execution flow now have better input handling and context wiring.
  • Chores
    • Strengthened type checking coverage across the CLI, reducing the chance of regressions.

@bradjin8 bradjin8 self-assigned this Jul 9, 2026
@bradjin8 bradjin8 requested a review from wpak-ai as a code owner July 9, 2026 21:31
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

CLI strict typing and handling

Layer / File(s) Summary
Strict mypy configuration
cli/pyproject.toml
Strict checking now applies to all localci packages without legacy CLI error-suppression overrides.
Command module type contracts
cli/localci/cli/analyze.py, config.py, list.py, logs.py
Imports and helper signatures now use explicit workflow, configuration, and job-result types.
Run flow typing and wrapping
cli/localci/cli/run/*
Run decorators, dependencies, execution planning, registry-path handling, matrix helpers, and preflight execution use more specific types.
Status value handling
cli/localci/cli/status.py
Status payloads receive explicit types, and _safe_float rejects booleans while handling numeric and string inputs explicitly.

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

Possibly related issues

  • cppalliance/local-ci-test-system issue 76 — Directly covers follow-up type-error cleanup in these CLI modules and removal of mypy overrides.

Possibly related PRs

Suggested reviewers: henry0816191, wpak-ai

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: removing mypy ignore_errors for CLI modules as part of the typing cleanup.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cli-mypy-strict

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

@bradjin8 bradjin8 requested a review from henry0816191 July 9, 2026 21:46
wpak-ai

This comment was marked as outdated.

@wpak-ai wpak-ai merged commit 0207764 into develop Jul 10, 2026
7 checks passed
@wpak-ai wpak-ai deleted the fix/cli-mypy-strict branch July 10, 2026 06:36
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.

Follow-up: type error fix after PR#72

3 participants