Closed MattPrit closed 1 year ago
Merging #90 (3c797fd) into master (b15df3c) will increase coverage by
0.05%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #90 +/- ##
==========================================
+ Coverage 98.59% 98.65% +0.05%
==========================================
Files 70 70
Lines 2141 2236 +95
==========================================
+ Hits 2111 2206 +95
Misses 30 30
Impacted Files | Coverage Δ | |
---|---|---|
tickit/adapters/interpreters/command/__init__.py | 100.00% <100.00%> (ø) |
|
...apters/interpreters/command/command_interpreter.py | 100.00% <100.00%> (ø) |
|
.../interpreters/command/multi_command_interpreter.py | 100.00% <100.00%> (ø) |
|
...kit/adapters/interpreters/command/regex_command.py | 100.00% <100.00%> (ø) |
|
tickit/__init__.py |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Closing this as not planned. When it becomes desired again raise a new issue, linked to this #177 .
Fixes #77
89 and #93 should be merged first.
Adds an interpreter capable of parsing multiple commands from a single message. This differs from the interpreter in #82 in that it is used when a message can contain multiple commands with no delimiter.
The interpreter works by attempting to match the regex pattern associated with each defined command with the start of the message; of those that match, the match corresponding to the largest number of characters is chosen. The matched part of the message is then removed and the process is repeated.
The current implementation is slightly nasty for a few reasons:
At the start of the(Fixed by #94 )handle
method the message is convertedAnyStr->str
- i.e.MultiCommandInterpreter
is not general.It makes use ofRegexCommand
but in a way that's inconsistent withCommandInterpreter
MultiCommandInterpreter
is in effect a generalization ofCommandInterpreter
, yet they don't really relate to each other.