Critical fixes:
- Add math.isfinite() check to reject NaN/Infinity in _safe_quote_price
- Raise TypeError instead of silent 0.0 fallback in price_feed.py
- Use dict instead of Mapping for external data validation
Type improvements:
- Add PortfolioSnapshot TypedDict for type safety
- Add DisplayMode and EntryBasisMode Literal types
- Add explicit dict[str, Any] annotation in to_dict()
- Remove cast() in favor of type comment validation
- Add -r requirements.txt to requirements-dev.txt
- Fix mypy errors:
- Remove slots=True from Settings dataclass
- Add explicit list[float] type annotations in hedge.py
- Add type ignore comments for optional QuantLib imports
- Use Sequence instead of list in GreeksTable for covariance
- Fix dict type annotation in options.py
- Add type ignore for nicegui attr-defined errors
- Disable attr-defined error code in mypy config
- Set ruff/black line length to 120
- Reformatted code with black
- Fixed import ordering with ruff
- Disabled lint for UI component files with long CSS strings
- Updated pyproject.toml with proper tool configuration