Commit Graph

9 Commits

Author SHA1 Message Date
junboli f64f6c14ed Fix the pep8 commands failed
* Fix the pep8 commands failed and Enable H904 checks in tox.ini.
* Hacking M331 still has Bug and remove it from HACKING, use H904 instead.

Change-Id: Iaf692bc139b309376917832aaa749cc141c11275
2017-07-27 22:15:12 +08:00
junboli a3a3f5330e Remove local Hacking for M318
Since we have added H203 in tox.ini [1], the local Hacking for M318
can be removed.
[1] https://review.openstack.org/#/c/484089/

Change-Id: Ieb652a41b77effdd8a67ea619ab592b1b065aec5
2017-07-27 08:27:29 +08:00
Sharat Sharma b38dceec50 Add a hacking rule for string interpolation at logging
From [1], string interpolation should be delayed to be handled by
the logging code, rather than being done at the point of the logging
call. Add a hacking rule, [M331], to delay the string interpolation.

[1] https://docs.openstack.org/oslo.i18n/latest/user/guidelines.html#adding-variables-to-log-messages
Change-Id: Ibf0ac960ae84e935979f93f3a0dec8d774aade78
Closes-Bug: #1705634
2017-07-26 11:13:15 +00:00
Hangdong Zhang 060d400d30 Update and optimize documentation links
1. Update URLs according to document migration
2. Update the dead and outdated links

Change-Id: I9dd7b1ae7fb9fcb0af1e22f789ffa89138649862
2017-07-19 17:10:49 +08:00
Sharat Sharma 61ed17e421 Added style enfore checks for assert statements
Added following style checks:
 * Enforce use of assertTrue/assertFalse
 * Enforce use of assertIs/assertIsNot

Change-Id: Ic4bc964fef9ea78934937dc74017569c2a55ba44
Implements: blueprint mistral-hacking
2017-06-05 16:05:57 +00:00
loooosy 2ea1df5aa2 Optimize the link address
Use https instead of http to ensure the safety

Change-Id: If1f5f2ce86b82ed48a7d8a990773638363f6043a
2017-04-17 22:02:34 +08:00
Sharat Sharma e986cb8542 Add hacking for code style checks
The following style checks are added:
 * do not use dict.iteritems
 * do not use dict.iterkeys
 * do not use dict.itervalues

Partial_implements: blueprint mistral-hacking

Change-Id: I25d846c80652d7746c3b958239797ce524ec235f
2017-03-16 07:38:09 +00:00
xpress 15d8ac5092 Enforce style check for xrange()
The following check is added in this commit:
* hacking checks for xrange()

Change-Id: If7bd8759445e5ca8cd5f4e74d91dcd02fa267904
Partial-Implements: blueprint mistral-hacking
2017-02-02 18:00:39 +05:30
Sharat Sharma 8aedd496d6 Enforce style check for assertIsNone
The following checks is added in this commit:
* enforce assertIsNone instead of assertEqual with a None

Change-Id: Idc7c5cb53060dad544bb9b8659e7220b7cd41e56
Partial-Implements: blueprint mistral-hacking
2017-01-18 05:59:34 +00:00