Skip to content

Commit 9cfaa5c

Browse files
committed
feat: add docstrings
1 parent 08b13e5 commit 9cfaa5c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

openhexa/sdk/pipelines/parameter/choices.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,19 @@ def _validate_spec(self):
4747
raise InvalidParameterError("ChoicesFromFile column must be a string.")
4848

4949
def __repr__(self) -> str:
50+
"""Return a string representation of the ChoicesFromFile instance."""
5051
if self.column is not None:
5152
return f"ChoicesFromFile({self.path!r}, column={self.column!r})"
5253
return f"ChoicesFromFile({self.path!r})"
5354

5455
def __eq__(self, other: object) -> bool:
56+
"""Check equality based on path and column."""
5557
if not isinstance(other, ChoicesFromFile):
5658
return NotImplemented
5759
return self.path == other.path and self.column == other.column
5860

5961
def __hash__(self) -> int:
62+
"""Return hash based on path and column."""
6063
return hash((self.path, self.column))
6164

6265
def to_dict(self) -> dict:

0 commit comments

Comments
 (0)