summaryrefslogtreecommitdiff
path: root/nova/hacking
diff options
context:
space:
mode:
authorEric Fried <efried@us.ibm.com>2018-03-29 10:27:30 -0500
committerEric Fried <efried@us.ibm.com>2018-03-29 10:27:30 -0500
commit6360fe11752ec88ca39d5ce27b76384eb00e7f50 (patch)
treefa15dae4c2a05f9e8f2c7c79b35caf2bb1b9ce12 /nova/hacking
parent00b19c73cfc72a79ab5ae4830a25dd53476a3b08 (diff)
downloadnova-6360fe11752ec88ca39d5ce27b76384eb00e7f50.tar.gz
Fix N332 api_version decorator hacking check
We spuriously ran afoul of N332 here [1]. This change set fixes the hacking check to be a little narrower and avoid (at least some) false positives. [1] https://review.openstack.org/#/c/557508/1/nova/tests/unit/volume/test_cinder.py@1014 Change-Id: I8c5e0854141d7c329483d00d26de7078dc756ee0
Diffstat (limited to 'nova/hacking')
-rw-r--r--nova/hacking/checks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/hacking/checks.py b/nova/hacking/checks.py
index 9f5c747142..eea0a775e6 100644
--- a/nova/hacking/checks.py
+++ b/nova/hacking/checks.py
@@ -85,7 +85,7 @@ import_translation_for_log_or_exception = re.compile(
r"(.)*(from\snova.i18n\simport)\s_")
# We need this for cases where they have created their own _ function.
custom_underscore_check = re.compile(r"(.)*_\s*=\s*(.)*")
-api_version_re = re.compile(r"@.*api_version")
+api_version_re = re.compile(r"@.*\bapi_version\b")
dict_constructor_with_list_copy_re = re.compile(r".*\bdict\((\[)?(\(|\[)")
decorator_re = re.compile(r"@.*")
http_not_implemented_re = re.compile(r"raise .*HTTPNotImplemented\(")