Skip to content

Commit f56a351

Browse files
authored
fix: make max_len optional in GreedyEncoder constructor to match docs and tests (#346)
## SUMMARY This PR fixes a mismatch in `GreedyEncoder` where `max_len` was required in code but optional in docs and tests. It updates `pyaptamer/trafos/encode/_greedy.py` to make `max_len` optional as intended. --- ## FIX **Before** ```python max_len: int, ``` **After** ```python max_len: int = None, ``` --- ## VERIFICATION Instantiating `GreedyEncoder` without `max_len` no longer throws a `TypeError`. It now works as documented, and existing test params run without issues. Signed-off-by: Suhrid Marwah <suhridmarwah07@gmail.com>
1 parent a5d1b58 commit f56a351

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pyaptamer/trafos/encode/_greedy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class GreedyEncoder(BaseTransform):
6060
def __init__(
6161
self,
6262
words: dict[str, int],
63-
max_len: int,
63+
max_len: int = None,
6464
word_max_len: int = None,
6565
):
6666
self.words = words

0 commit comments

Comments
 (0)