7023050edd
The best practice in Python is not to use mutable object (i.e. list, dictionary, or instances of most classes) as value of default argument (see https://goo.gl/Kwhg0T). A hacking rule to enforce this practice is added as well. The patch was inspired by CR https://review.openstack.org/#/c/198465/ and took most of its code from it as well. That's why original copyrights are kept. Closes-Bug: #1471349 Change-Id: Ia77b1736dbc3d4e28ff2d2c3424e9cfcaefa5077
569 B
569 B
Horizon Style Commandments
- Step 1: Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
- Step 2: Read [hacking] section in tox.ini to find the list of names which can be imported directly without triggering the "H302: import only modules" flake8 warning
- Step 3: Read on
Horizon Specific Commandments
- Read the Horizon contributing documentation at http://docs.openstack.org/developer/horizon/contributing.html
- [M322] Method's default argument shouldn't be mutable.