-
Notifications
You must be signed in to change notification settings - Fork 344
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
Ignore fewer flake8 rules, add flake8-bugbear #1133
Conversation
pyquil/tests/test_noise.py
Outdated
@@ -134,7 +134,7 @@ def test_decoherence_noise(): | |||
|
|||
# verify that gate names are translated | |||
new_prog = apply_noise_model(prog, m3) | |||
new_gates = _get_program_gates(new_prog) | |||
_get_program_gates(new_prog) |
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.
_get_program_gates
doesn't appear to be side-effecty, nix? or else maybe the intention was to do something with new_gates
?
pyquil/tests/test_quil.py
Outdated
less_trivial_pi = "3 * theta[0] * 2 / (pi)" | ||
prog = Program(f"RX({trivial_pi}) 0") | ||
exp = str(prog[0].params[0]) | ||
assert _eval_as_np_pi(trivial_pi) == _eval_as_np_pi(exp) |
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.
perhaps the line below was actually meant to RX({less_trivial_pi})
and then _eval_as_np_pi(less_trivial_pi)
on line 1391?
pyquil/tests/test_quil.py
Outdated
more_less_trivial_pi = "3 / (theta[0] / (pi + 1)) / pi" | ||
prog = Program(f"RX({trivial_pi}) 0") | ||
exp = str(prog[0].params[0]) | ||
assert _eval_as_np_pi(trivial_pi) == _eval_as_np_pi(exp) |
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.
ditto
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.
Maybe a couple more?
Hmmm semaphore tests passed, so maybe not! |
Description
Follow-up to #1132. Fixes #1109.
The only remaining excluded
flake8
rules are:In addition, adds
flake8-bugbear
which contains some additional rules (the developers of Black use it, and it's otherwise widely used).Finally, consolidates the style-related
Makefile
targets / CI jobs under a single naming convention:check-all
,check-format
,check-style
, andcheck-types
.Checklist
including author and PR number (@username, gh-xxx).