Skip to content

refactor: Enable a few more mypy checks and fix related typing issues.#207

Merged
bvanelli merged 2 commits into
mainfrom
refactor/mypy-enable-some-checks
Jun 26, 2026
Merged

refactor: Enable a few more mypy checks and fix related typing issues.#207
bvanelli merged 2 commits into
mainfrom
refactor/mypy-enable-some-checks

Conversation

@bvanelli

@bvanelli bvanelli commented Jun 26, 2026

Copy link
Copy Markdown
Owner
  • Turns on disallow_subclassing_any, disallow_untyped_calls, check_untyped_defs and warn_return_any.
  • Replaces the dict-returning crypto.encrypt() / make_test_message() with EncryptionTestDTO, propagating through upload_user_file and tests, adds missing return-type annotations, and narrows generic collections. The vendored actual.utils.openid and the proto.Message-driven actual.protobuf_models are isolated via per-module overrides.

bvanelli and others added 2 commits June 26, 2026 23:34
Turns on `disallow_subclassing_any`, `disallow_untyped_calls`,
`check_untyped_defs`, and `warn_return_any` (still well short of `--strict`)
and addresses the resulting failures. Replaces the dict-returning
`crypto.encrypt()` / `make_test_message()` with `EncryptionTestDTO`,
propagating through `upload_user_file` and tests, adds missing return-type
annotations, and narrows generic collections. The vendored
`actual.utils.openid` and the `proto.Message`-driven
`actual.protobuf_models` are isolated via per-module overrides.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…e payee/account names in CLI.

- `user_create_key` now serializes the DTO with `model_dump_json(by_alias=True)` instead of `json.dumps`, which can't handle pydantic models.
- `EncryptMetaDTO(**encrypted.meta)` in the test was double-wrapping the DTO; pass `encrypted.meta` directly.
- CLI accounts/payees commands no longer skip rows when `name` is None; render as empty string instead to preserve the previous output.

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

codecov Bot commented Jun 26, 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.49%. Comparing base (ecfc878) to head (cd169c6).

Files with missing lines Patch % Lines
actual/__init__.py 93.75% 1 Missing ⚠️
actual/protobuf_models.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #207      +/-   ##
==========================================
- Coverage   97.54%   97.49%   -0.05%     
==========================================
  Files          21       22       +1     
  Lines        3257     3277      +20     
==========================================
+ Hits         3177     3195      +18     
- Misses         80       82       +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 b967a17 into main Jun 26, 2026
10 checks passed
@bvanelli bvanelli deleted the refactor/mypy-enable-some-checks branch June 26, 2026 21:44
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