From: Christian Heller Date: Mon, 22 Sep 2025 07:08:38 +0000 (+0200) Subject: In MsgParseGuides, allow empty-string path steps. X-Git-Url: https://plomlompom.com/repos/?a=commitdiff_plain;h=8c12cf1eb52d4713fd102605b2f05d9b2a9d84c4;p=ircplom In MsgParseGuides, allow empty-string path steps. --- diff --git a/ircplom/msg_parse_expectations.py b/ircplom/msg_parse_expectations.py index dd39bd7..2bb1857 100644 --- a/ircplom/msg_parse_expectations.py +++ b/ircplom/msg_parse_expectations.py @@ -26,7 +26,8 @@ class _Command(NamedTuple): def from_(cls, input_: str) -> Self: 'Split by first "_" into verb, path (split into steps tuple by ".").' verb, path_str = input_.split('_', maxsplit=1) - return cls(verb, tuple(step for step in path_str.split('.') if step)) + return cls(verb, tuple(step for step in path_str.split('.') + if path_str)) class _MsgParseExpectation: