home
·
contact
·
privacy
projects
/
ircplom
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33e9a37
)
Very minor refactoring.
author
Christian Heller
<c.heller@plomlompom.de>
Thu, 4 Sep 2025 00:17:36 +0000
(
02:17
+0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Thu, 4 Sep 2025 00:17:36 +0000
(
02:17
+0200)
ircplom/msg_parse_expectations.py
patch
|
blob
|
history
diff --git
a/ircplom/msg_parse_expectations.py
b/ircplom/msg_parse_expectations.py
index 4dc02b60e5ec7de758962de2357f31fe44926119..b23b1e3dc5d8464eff0472b80103b20d0fde3739 100644
(file)
--- a/
ircplom/msg_parse_expectations.py
+++ b/
ircplom/msg_parse_expectations.py
@@
-46,10
+46,9
@@
class _MsgParseExpectation:
@classmethod
def from_(cls, input_: str) -> Self:
'Split by ":" into commands (further split by ","), title.'
- toks = input_.split(':', maxsplit=1)
- title = toks[1]
- commands = [_Command.from_(t) for t in toks[0].split(',') if t]
- return cls(title, tuple(commands))
+ cmdsstr, title = input_.split(':', maxsplit=1)
+ return cls(title, tuple(_Command.from_(t)
+ for t in cmdsstr.split(',') if t))
class _TokExpectation(NamedTuple):
type_: _MsgTok | str