Fix type hints and dependency issues for CI
- 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
This commit is contained in:
@@ -47,10 +47,10 @@ try: # pragma: no cover - optional QuantLib modules
|
||||
)
|
||||
from .volatility import implied_volatility
|
||||
except ImportError: # pragma: no cover - optional dependency
|
||||
AmericanOptionInputs = None
|
||||
AmericanPricingResult = None
|
||||
american_option_price_and_greeks = None
|
||||
implied_volatility = None
|
||||
AmericanOptionInputs = None # type: ignore[misc,assignment]
|
||||
AmericanPricingResult = None # type: ignore[misc,assignment]
|
||||
american_option_price_and_greeks = None # type: ignore[assignment]
|
||||
implied_volatility = None # type: ignore[assignment]
|
||||
else:
|
||||
__all__.extend(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user