Commit Graph

13 Commits

Author SHA1 Message Date
Takashi Kajinami 44cd95684b Bump hacking
hacking 3.0.x is too old.

Also remove the note about pip's behavior which was already fixed in
recent versions.

Change-Id: I65d350943649c3346ed5741631c01724ddd256ef
2024-02-19 02:23:53 +09:00
Q.hongtao 4bc6162515 Remove six library
Remove six-library Replace the following items with Python 3 style code.
- six.interger_types
- six.itervalues
- six.text_type
- six.string_types
- six.StringIO
- six.next
- six.b
- six.PY3

Change-Id: I299c90d5cbeb41be0132691265b8dcbeae65520e
2020-09-23 10:27:12 +08:00
Q.hongtao da5ac25415 Remove six.moves
Remove six.moves Replace the following items with Python 3 style code.
- six.moves.urllib
- six.moves.queue
- six.moves.range
- six.moves.http_client

Subsequent patches will replace other six usages.

Change-Id: I80c713546fcc97391c64e95ef708830632e1ef32
2020-09-22 08:34:20 +08:00
Andreas Jaeger 2c99ddc3ef Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Update local hacking checks for new flake8.

Remove hacking and friends from lower-constraints, they are not
needed in installations.

Change-Id: Ia4740a1dc343d7a4a303674d9377bc64f6df762b
2020-04-01 20:01:29 +02:00
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
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
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
zhangguoqing 7e0ffb7bec Hacking log for warning
specially checking LOG.warn to LOG.warning
https://review.openstack.org/#/c/263112/

Reference: https://review.openstack.org/#/c/264334/

Change-Id: I694ca1d30bb8fac503dbe11b53b5f8bae3a86864
2016-03-30 11:50:15 +00:00
Doug Hellmann 2e0cde447a Drop use of 'oslo' namespace package
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names, and adds a hacking
check to prevent regressions.

The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.

Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.

Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages

Change-Id: I7137e7199f1cd6cdeacbc6c421d294f596e2ec0e
2015-07-14 06:25:24 +00:00