fix(types): resolve all mypy type errors (CORE-003)

- Fix return type annotation for get_default_premium_for_product
- Add type narrowing for Weight|Money union using _as_money helper
- Add isinstance checks before float() calls for object types
- Add type guard for Decimal.exponent comparison
- Use _unit_typed and _currency_typed properties for type narrowing
- Cast option_type to OptionType Literal after validation
- Fix provider type hierarchy in backtesting services
- Add types-requests to dev dependencies
- Remove '|| true' from CI type-check job

All 36 mypy errors resolved across 15 files.
This commit is contained in:
Bu5hm4nn
2026-03-30 00:05:09 +02:00
parent 36ba8731e6
commit 887565be74
15 changed files with 193 additions and 55 deletions

View File

@@ -70,5 +70,5 @@ jobs:
- name: Run mypy
run: |
echo "Running mypy on core modules..."
mypy app/core app/models app/strategies app/services --ignore-missing-imports --show-error-codes --show-traceback || true
echo "Type check completed (warnings allowed during development - see CORE-003 roadmap task)"
mypy app/core app/models app/strategies app/services --ignore-missing-imports --show-error-codes --show-traceback
echo "Type check completed successfully"