Jirka Borovec 0c2ebfd6e1
Ruff: use I rule for isort (#1410)
Ruff: use I rule for isort
2024-04-29 15:41:58 -07:00

34 lines
665 B
Python

from dataclasses import dataclass
from opendevin.schema import ObservationType
from .base import Observation
@dataclass
class FileReadObservation(Observation):
"""
This data class represents the content of a file.
"""
path: str
observation: str = ObservationType.READ
@property
def message(self) -> str:
return f'I read the file {self.path}.'
@dataclass
class FileWriteObservation(Observation):
"""
This data class represents a file write operation
"""
path: str
observation: str = ObservationType.WRITE
@property
def message(self) -> str:
return f'I wrote to the file {self.path}.'