Skip to content

Commit

Permalink
add comment about naive regular expression.
Browse files Browse the repository at this point in the history
  • Loading branch information
amit lissack committed Mar 17, 2021
1 parent 9a5eb16 commit 72148b2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion api/src/opentrons/hardware_control/emulation/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@


LINE_REGEX = re.compile(r"(\S+)(.+)")
"""Split the line into command and payload"""
"""Split the line into command and payload.
TODO AL 20210222 This regex is a very naive approach and should be revisited
if we are going to expand emulator support.
We can use a regex like "[A-Z][0-9]+\\.*[0-9]*" to match gcodes (i think). And
handle our custom directives like 'version' and 'dfu' separately.
"""


class ConnectionHandler:
Expand Down

0 comments on commit 72148b2

Please sign in to comment.