mirror of https://github.com/hwchase17/langchain
community[patch]: mypy ignore fix (#18483)
Relates to #17048 Description : Applied fix to dynamodb and elasticsearch file. Error was : `Cannot override writeable attribute with read-only property` Suggestion: instead of adding ``` @messages.setter def messages(self, messages: List[BaseMessage]) -> None: raise NotImplementedError("Use add_messages instead") ``` we can change base class property `messages: List[BaseMessage]` to ``` @property def messages(self) -> List[BaseMessage]:... ``` then we don't need to add `@messages.setter` in all child classes.pull/18444/head^2
parent
dc9e9a66db
commit
dfc4177b50
Loading…
Reference in New Issue