[release-announce] hacking 4.0.0

no-reply at openstack.org no-reply at openstack.org
Thu Nov 12 11:29:54 UTC 2020


We are psyched to announce the release of:

hacking 4.0.0: OpenStack Hacking Guideline Enforcement

The source is available from:

    https://opendev.org/openstack/hacking

Download the package from:

    https://pypi.org/project/hacking

For more details, please see below.

4.0.0
^^^^^

New Features

* This release added new checks related to unittest module:

  * [H211] Change assertTrue(isinstance(A, B)) by optimal assert
    like assertIsInstance(A, B).

  * [H212] Change assertEqual(type(A), B) by optimal assert like
    assertIsInstance(A, B)

  * [H213] Check for usage of deprecated assertRaisesRegexp

  * [H214] Change assertTrue/False(A in/not in B, message) to the
    more specific assertIn/NotIn(A, B, message)

  * [H215] Change assertEqual(A in B, True), assertEqual(True, A in
    B), assertEqual(A in B, False) or assertEqual(False, A in B) to
    the more specific assertIn/NotIn(A, B)

Changes in hacking 3.2.0..4.0.0
-------------------------------

f82f995 Catch .format() use in log string interpoliation check
31e9c87 Handle formatting of args in string interpolation check
bfc1a64 Move the most common hacking rules from other projects
f70a450 Fix H903 hacking_no_cr
6002520 Fix H904 hacking_delayed_string_interpolation


Diffstat (except docs and test files)
-------------------------------------

HACKING.rst                                        |  15 ++
hacking/checks/except_checks.py                    | 108 +++++++++
hacking/checks/other.py                            |  21 +-
lower-constraints.txt                              |   1 +
.../migrating-most-common-hacking-checks.yaml      |  19 ++
setup.cfg                                          |   5 +
test-requirements.txt                              |   2 +
9 files changed, 458 insertions(+), 8 deletions(-)


Requirements updates
--------------------

diff --git a/test-requirements.txt b/test-requirements.txt
index 203cea2..c52331a 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -5,0 +6 @@ fixtures>=3.0.0 # Apache-2.0/BSD
+mock>=3.0.0 # BSD
@@ -9,0 +11 @@ testtools>=2.2.0 # MIT
+ddt>=1.2.1 # MIT






More information about the Release-announce mailing list