Freeze option leg dataclass in order to allow for hashing

This commit is contained in:
moshferatu 2023-12-08 12:38:06 -08:00
parent c94919916f
commit c6f86b8fd1

View File

@ -2,7 +2,7 @@ from dataclasses import dataclass
from datetime import datetime from datetime import datetime
from typing import Literal from typing import Literal
@dataclass @dataclass(frozen=True)
class OptionLeg: class OptionLeg:
symbol: str symbol: str
expiration: datetime expiration: datetime