Merge "hacking: Remove dead code"

This commit is contained in:
Jenkins 2017-07-20 23:59:28 +00:00 committed by Gerrit Code Review
commit e65784d0be
2 changed files with 0 additions and 20 deletions

View File

@ -14,7 +14,6 @@ while other rules are specific to Neutron repository.
Below you can find a list of checks specific to this repository.
- [N320] Validate that LOG messages, except debug ones, have translations
- [N322] Detect common errors with assert_called_once_with
- [N328] Detect wrong usage with assertEqual
- [N330] Use assertEqual(*empty*, observed) instead of

View File

@ -41,25 +41,6 @@ def flake8ext(f):
# - Add test cases for each new rule to
# neutron/tests/unit/hacking/test_checks.py
_all_log_levels = {
'reserved': '_', # this should never be used with a log unless
# it is a variable used for a log message and
# a exception
'error': '_LE',
'info': '_LI',
'warning': '_LW',
'critical': '_LC',
'exception': '_LE',
}
_all_hints = set(_all_log_levels.values())
def _regex_for_level(level, hint):
return r".*LOG\.%(level)s\(\s*((%(wrong_hints)s)\(|'|\")" % {
'level': level,
'wrong_hints': '|'.join(_all_hints - set([hint])),
}
unittest_imports_dot = re.compile(r"\bimport[\s]+unittest\b")
unittest_imports_from = re.compile(r"\bfrom[\s]+unittest\b")