tests: type the FidelityHolding factory list to satisfy CI mypy
CI runs mypy on both broker_sync/ and tests/, with stricter 'Missing type arguments for generic type' enforcement. Local mypy was only scoped to broker_sync/. Annotate the test helper with list[FidelityHolding]; lift the import to module-level.
This commit is contained in:
parent
d860aef927
commit
d5dbeb96af
1 changed files with 2 additions and 2 deletions
|
|
@ -17,6 +17,7 @@ from broker_sync.providers.fidelity_planviewer import (
|
||||||
gains_offset_delta_activity,
|
gains_offset_delta_activity,
|
||||||
)
|
)
|
||||||
from broker_sync.providers.parsers.fidelity import (
|
from broker_sync.providers.parsers.fidelity import (
|
||||||
|
FidelityHolding,
|
||||||
parse_transactions_html,
|
parse_transactions_html,
|
||||||
parse_valuation_json,
|
parse_valuation_json,
|
||||||
)
|
)
|
||||||
|
|
@ -152,8 +153,7 @@ def test_provider_caches_holdings_for_cli_snapshot_push() -> None:
|
||||||
# -- delta-shaped gains offset (the monthly accumulation mechanism) --
|
# -- delta-shaped gains offset (the monthly accumulation mechanism) --
|
||||||
|
|
||||||
|
|
||||||
def _holdings_summing_to(total: Decimal) -> list:
|
def _holdings_summing_to(total: Decimal) -> list[FidelityHolding]:
|
||||||
from broker_sync.providers.parsers.fidelity import FidelityHolding
|
|
||||||
return [FidelityHolding(
|
return [FidelityHolding(
|
||||||
fund_code="KDOA", fund_name="Test", units=Decimal("100"),
|
fund_code="KDOA", fund_name="Test", units=Decimal("100"),
|
||||||
unit_price=total / Decimal("100"), currency="GBP", total_value=total,
|
unit_price=total / Decimal("100"), currency="GBP", total_value=total,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue