update pylint to 1.9.2

The older version of pylint being used does not work
correctly under python 3. In order to be able to
update the pylint job to run under python 3,
we need to update the tool.

Aslo fix a couple of pylint issues:

- Fix import order issues.
- Fix 'no-else-return' checks.

Added the following to the blacklist:

- inconsistent-return-statements
- catching-non-exception
- using-constant-test

Change-Id: I91a304241ebdb4d6bd15509cae8463d7b43b3c0f
Signed-off-by: Chuck Short <chucks@redhat.com>
This commit is contained in:
Chuck Short 2018-08-21 09:25:29 -04:00
parent 5044279f58
commit ac3c95c1b4
5 changed files with 8 additions and 5 deletions

View File

@ -37,6 +37,9 @@ disable=
too-many-locals,
too-many-public-methods,
too-many-return-statements,
inconsistent-return-statements,
catching-non-exception,
using-constant-test,
too-many-statements
[BASIC]

View File

@ -31,7 +31,7 @@ pbr==2.0.0
pep8==1.5.7
pyflakes==0.8.1
Pygments==2.2.0
pylint==1.4.5
pylint==1.9.2
python-mimeparse==1.6.0
python-subunit==1.0.0
pytz==2013.6

View File

@ -39,5 +39,4 @@ def avoid_blocking_call(f, *args, **kwargs):
# loop greenlet.
if eventlet.getcurrent().parent:
return tpool.execute(f, *args, **kwargs)
else:
return f(*args, **kwargs)
return f(*args, **kwargs)

View File

@ -10,9 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
import netaddr
import uuid
import netaddr
# NOTE(twilson) Clearly these are silly, but they are good enough for now
# I'm happy for someone to replace them with better parsing

View File

@ -10,7 +10,7 @@ sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
openstackdocstheme>=1.18.1 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
os-testr>=1.0.0 # Apache-2.0
pylint==1.4.5 # GPLv2
pylint==1.9.2 # GPLv2
stestr>=2.0.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT