Merge "Change hacking check to verify all oslo imports"
This commit is contained in:
commit
a3fd4e8570
|
@ -24,9 +24,7 @@ import re
|
||||||
|
|
||||||
def check_oslo_namespace_imports(logical_line, blank_before, filename):
|
def check_oslo_namespace_imports(logical_line, blank_before, filename):
|
||||||
oslo_namespace_imports = re.compile(
|
oslo_namespace_imports = re.compile(
|
||||||
r"(((from)|(import))\s+oslo\."
|
r"(((from)|(import))\s+oslo\.)|(from\s+oslo\s+import\s+)")
|
||||||
"((config)|(serialization)|(utils)|(i18n)))|"
|
|
||||||
"(from\s+oslo\s+import\s+((config)|(serialization)|(utils)|(i18n)))")
|
|
||||||
|
|
||||||
if re.match(oslo_namespace_imports, logical_line):
|
if re.match(oslo_namespace_imports, logical_line):
|
||||||
msg = ("K333: '%s' must be used instead of '%s'.") % (
|
msg = ("K333: '%s' must be used instead of '%s'.") % (
|
||||||
|
|
Loading…
Reference in New Issue