pin isort to 4.3.21, cap sphinx

isort 4.3.21 is the last isort release that supports python2
sphinx on python2 requires <2.0.0

Change-Id: Ie09391eaad5f556a8ca78219fe268bc3801bbc36
This commit is contained in:
Gregory Thiemonge 2020-10-06 13:54:14 +02:00 committed by Michael Johnson
parent 0fa0b98ca8
commit 5ce2e066b1
5 changed files with 12 additions and 6 deletions

View File

@ -54,7 +54,8 @@ disable=
too-many-statements,
multiple-statements,
duplicate-except,
keyword-arg-before-vararg
keyword-arg-before-vararg,
useless-object-inheritance
[BASIC]
# Variable names can be 1 to 31 characters long, with lowercase and underscores

View File

@ -1,4 +1,5 @@
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
openstackdocstheme>=1.18.1 # Apache-2.0
# releasenotes
reno>=2.5.0 # Apache-2.0

View File

@ -2,6 +2,7 @@ bandit==1.4.0
coverage==4.0
doc8==0.6.0
hacking==0.12.0
isort==4.3.21
mock==2.0.0
oslo.i18n==3.15.3
oslo.log==3.36.0

View File

@ -41,7 +41,7 @@ _log_translation_hint = re.compile(
assert_trueinst_re = re.compile(
r"(.)*assertTrue\(isinstance\((\w|\.|\'|\"|\[|\])+, "
"(\w|\.|\'|\"|\[|\])+\)\)")
r"(\w|\.|\'|\"|\[|\])+\)\)")
assert_equal_in_end_with_true_or_false_re = re.compile(
r"assertEqual\((\w|[][.'\"])+ in (\w|[][.'\", ])+, (True|False)\)")
assert_equal_in_start_with_true_or_false_re = re.compile(
@ -92,14 +92,14 @@ def _check_namespace_imports(failure_code, namespace, new_ns, logical_line,
logical_line.replace('%s.' % namespace, new_ns),
logical_line)
return (0, msg_o or msg)
elif _check_imports(namespace_imports_from_root, namespace, logical_line):
if _check_imports(namespace_imports_from_root, namespace, logical_line):
msg = ("%s: '%s' must be used instead of '%s'.") % (
failure_code,
logical_line.replace(
'from %s import ' % namespace, 'import %s' % new_ns),
logical_line)
return (0, msg_o or msg)
elif _check_imports(namespace_imports_dot, namespace, logical_line):
if _check_imports(namespace_imports_dot, namespace, logical_line):
msg = ("%s: '%s' must be used instead of '%s'.") % (
failure_code,
logical_line.replace('import', 'from').replace('.', ' import '),

View File

@ -8,7 +8,10 @@ bandit>=1.1.0 # Apache-2.0
coverage>=4.0,!=4.4 # Apache-2.0
doc8>=0.6.0 # Apache-2.0
mock>=2.0.0 # BSD
pylint==1.9.2 # GPLv2
pylint==1.9.2;python_version<'3.0' # GPLv2
pylint>=1.9.2,<=2.5.3;python_version>='3.0' # GPLv2
# Workaround for pylint dependency issue with py2.7
isort==4.3.21;python_version=='2.7' # MIT
python-subunit>=1.0.0 # Apache-2.0/BSD
oslo.utils>=3.33.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0