home · contact · privacy
Avoid zero-length task path steps.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 4 Sep 2025 01:34:58 +0000 (03:34 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 4 Sep 2025 01:34:58 +0000 (03:34 +0200)
ircplom/msg_parse_expectations.py

index c91ff3e722904de5b076afe055463d9a532a7e1a..585f25bce376525facb316ca6c525d81057d591f 100644 (file)
@@ -26,7 +26,7 @@ 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(path_str.split('.')))
+        return cls(verb, tuple(step for step in path_str.split('.') if step))
 
 
 class _MsgParseExpectation: