amazon-braket-sdk-python
amazon-braket-sdk-python copied to clipboard
add placeholder methods for result types to enable ide compatibility
Issue #, if available:
Description of changes:
Previously, ResultType.StateVector() for example would not be recognized as valid by the IDE, since result type constructors as ResultType classmethods are defined dynamically. Adding placeholder classmethods for established result types so the IDE recognizes them as valid.
Testing done:
existing tox and manual verification that result types work as previously (no logic was changed)
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
- [X] I have read the CONTRIBUTING doc
- [X] I used the commit message format described in CONTRIBUTING
- [X] I have updated any necessary documentation, including READMEs and API docs (if appropriate)
Tests
- [X] I have added tests that prove my fix is effective or that my feature works (if appropriate)
- [X] I have checked that my tests are not configured for a specific region or account (if appropriate)
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Codecov Report
Merging #196 (e0c5e85) into main (e31511f) will decrease coverage by
0.21%
. The diff coverage is66.66%
.
@@ Coverage Diff @@
## main #196 +/- ##
==========================================
- Coverage 99.51% 99.29% -0.22%
==========================================
Files 35 35
Lines 2261 2276 +15
Branches 295 295
==========================================
+ Hits 2250 2260 +10
- Misses 6 11 +5
Partials 5 5
Impacted Files | Coverage Δ | |
---|---|---|
src/braket/circuits/result_type.py | 93.82% <66.66%> (-6.18%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update e31511f...e0c5e85. Read the comment docs.