Skip to content

refactor: Enable mypy strict mode#210

Merged
bvanelli merged 1 commit into
mainfrom
refactor/enable-strict-mode
Jun 28, 2026
Merged

refactor: Enable mypy strict mode#210
bvanelli merged 1 commit into
mainfrom
refactor/enable-strict-mode

Conversation

@bvanelli

@bvanelli bvanelli commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Enable the remaining strict flags (disallow_any_generics, disallow_untyped_defs, disallow_incomplete_defs) and consolidate to strict = true since all individual strict checks are now satisfied.

  • Annotate remaining untyped functions and parameters across the library.
  • Tighten generic types: dict -> dict[str, Any], Column -> Column[Any], Select -> SelectOfScalar[int | None]. For some of them, there was no real better choice than choosing Any.
  • Raise ActualDecryptionError when optional encryption metadata fields are missing instead of letting b64decode(None) fail.
  • Rename a shadowed balance local in _get_category_detailed_budget to keep the Decimal-typed result distinct from the int | None scalar query result.

Enable the remaining strict flags (disallow_any_generics, disallow_untyped_defs,
disallow_incomplete_defs) and consolidate to `strict = true` since all individual
strict checks are now satisfied.

- Annotate remaining untyped functions and parameters across the library.
- Tighten generic types: `dict` -> `dict[str, Any]`, `Column` -> `Column[Any]`,
  `Select` -> `SelectOfScalar[int | None]`.
- Raise `ActualDecryptionError` when optional encryption metadata fields are
  missing instead of letting `b64decode(None)` fail.
- Rename a shadowed `balance` local in `_get_category_detailed_budget` to keep
  the Decimal-typed result distinct from the `int | None` scalar query result.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.43590% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.44%. Comparing base (b967a17) to head (d0f9dad).

Files with missing lines Patch % Lines
actual/__init__.py 94.11% 1 Missing ⚠️
actual/crypto.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #210      +/-   ##
==========================================
- Coverage   97.49%   97.44%   -0.06%     
==========================================
  Files          22       22              
  Lines        3277     3282       +5     
==========================================
+ Hits         3195     3198       +3     
- Misses         82       84       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bvanelli bvanelli merged commit fc9cadf into main Jun 28, 2026
10 checks passed
@bvanelli bvanelli deleted the refactor/enable-strict-mode branch June 28, 2026 10:46
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.

1 participant