diff options
author | 2021-02-21 03:04:32 +0100 | |
---|---|---|
committer | 2021-02-23 03:33:29 +0100 | |
commit | cec78fd1eb3b8da00fe8d2c5057fbbb417ac0255 (patch) | |
tree | 759173ed4452f91ec6305f831ef17a6aad9c0f19 | |
parent | Add unittests for _split_signature (diff) |
Correct length adjustment
the placeholder contains a space and is actually 4 chars because of that
with a comma that adds up to 5 characters in the signature instead
of 4
-rw-r--r-- | bot/exts/info/doc/_parsing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/info/doc/_parsing.py b/bot/exts/info/doc/_parsing.py index f6e25937e..c26af8ac3 100644 --- a/bot/exts/info/doc/_parsing.py +++ b/bot/exts/info/doc/_parsing.py @@ -118,7 +118,7 @@ def _truncate_signatures(signatures: Collection[str]) -> Union[List[str], Collec parameters_string = parameters_match[1] running_length = len(signature) - len(parameters_string) for parameter in _split_parameters(parameters_string): - if (len(parameter) + running_length) <= max_signature_length - 4: # account for comma and placeholder + if (len(parameter) + running_length) <= max_signature_length - 5: # account for comma and placeholder truncated_signature.append(parameter) running_length += len(parameter) + 1 else: |