-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python TemplateAccessor and CmdResponseProtocol #1684
Python TemplateAccessor and CmdResponseProtocol #1684
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1684 +/- ##
==========================================
+ Coverage 76.48% 76.52% +0.04%
==========================================
Files 618 620 +2
Lines 46929 47094 +165
Branches 850 850
==========================================
+ Hits 35892 36038 +146
- Misses 10941 10961 +20
+ Partials 96 95 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
escaped_right_char = f"\\{self.right_char}" | ||
|
||
# Convert the template into a Regexp for reading each item | ||
template = self.packet.template[:] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could just add .decode()
here and do it once
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
if self.left_char == "(": | ||
item = f"\({item[1:]}" | ||
if self.right_char == ")": | ||
item = f"{item[0:-1]}\)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At line 34 and 37 it is a double \\
but here a single \(
. Is that correct? Ruby has double \\
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. One is for a regex and the other is for a string replace
if values is not None: | ||
num_items = len(values) | ||
raise RuntimeError( | ||
f"Unexpected number of items found in buffer= {num_items}, Expected= {len(self.item_keys)}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ruby code is buffer:
and Expected:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
if values is not None: | ||
num_items = len(values) | ||
raise RuntimeError( | ||
f"Unexpected number of items found in buffer= {num_items}, Expected= {len(self.item_keys)}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change =
to :
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Quality Gate passedIssues Measures |
No description provided.