Commit Graph

7 Commits

Author SHA1 Message Date
Christian Clauss
ef9827166e
Approve functions used as default arguments (#4699)
* Approve functions used as default argumenets

* The default value for **seed** is the result of a function call

The default value for **seed** is the result of a function call which is not normally recommended and causes flake8-bugbear to raise a B008 error. However, in this case, it is accptable because `LinearCongruentialGenerator.__init__()` will only be called once per instance and it ensures that each instance will generate a unique sequence of numbers.

* The default value for **backend** is the result of a function call

The default value for **backend** is the result of a function call which is not normally recommended and causes flake8-bugbear to raise a B008 error. However, in this case, it is accptable because `Aer.get_backend()` is called when the function is definition and that same backend is then reused for function calls.

* Update linear_congruential_generator.py

* Update ripple_adder_classic.py

* Update ripple_adder_classic.py

* Update ripple_adder_classic.py

* Update ripple_adder_classic.py

* Update ripple_adder_classic.py
2021-08-31 07:56:19 +02:00
Christian Clauss
9316e7c014
Set the Python file maximum line length to 88 characters (#2122)
* flake8 --max-line-length=88

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-06-16 10:09:19 +02:00
Christian Clauss
bfcb95b297
Create codespell.yml (#1698)
* fixup! Format Python code with psf/black push

* Create codespell.yml

* fixup! Format Python code with psf/black push
2020-01-18 13:24:33 +01:00
Christian Clauss
28419cf839 pyupgrade --py37-plus **/*.py (#1654)
* pyupgrade --py37-plus **/*.py

* fixup! Format Python code with psf/black push
2020-01-03 22:25:36 +08:00
William Zhang
9eac17a408 psf/black code formatting (#1277) 2019-10-05 10:14:13 +05:00
Christian Clauss
47a9ea2b0b
Simplify code by dropping support for legacy Python (#1143)
* Simplify code by dropping support for legacy Python

* sort() --> sorted()
2019-08-19 15:37:49 +02:00
Alex Brown
91fccecb56 snake_case all the things 2018-10-19 17:14:25 -05:00