-
Notifications
You must be signed in to change notification settings - Fork 121
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
feat: sanitize hp strings #742
Conversation
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature/job-decorator #742 +/- ##
=======================================================
Coverage 100.00% 100.00%
=======================================================
Files 129 129
Lines 8381 8387 +6
Branches 1864 1866 +2
=======================================================
+ Hits 8381 8387 +6
☔ View full report in Codecov by Sentry. |
src/braket/jobs/hybrid_job.py
Outdated
.replace("\n", " ") | ||
# replace forbidden characters with "?" | ||
.replace("$", "?") | ||
.replace("(", "?") |
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.
Would {}
be a more natural replacement for ()
?
src/braket/jobs/hybrid_job.py
Outdated
# replace forbidden characters with "?" | ||
.replace("$", "?") | ||
.replace("(", "?") | ||
.replace("&", "?") |
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.
Would amp;
be a more natural replacement?
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.
I may prefer +
to maintain the number of chars (for indexing and length constraints)
src/braket/jobs/hybrid_job.py
Outdated
.replace("$", "?") | ||
.replace("(", "?") | ||
.replace("&", "?") | ||
.replace("`", "?") |
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.
Would '
be a more natural replacement?
Issue #, if available:
Description of changes:
shorten long strings and replace forbidden chars with
?
Testing done:
unit and manual testing
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.