Fixed issues that occured with pylint 1.7.2
When updating the previously used version of pylint 1.6.5 to 1.7.2 some new issues where found. This patch fixes these issues: ************* Module kas.config E:402, 0: Bad option value 'redefined-variable-type' (bad-option-value) ************* Module kas.includehandler E: 33, 0: No name 'version' in module 'distutils' (no-name-in-module) E: 33, 0: Unable to import 'distutils.version' (import-error) R:239,12: Unnecessary "else" after "return" (no-else-return) ************* Module kas.libkas C:214, 7: Do not use `len(SEQUENCE)` as condition value (len-as-condition) ************* Module kas.repos R: 54,12: Unnecessary "else" after "return" (no-else-return) Signed-off-by: Claudius Heine <ch@denx.de>
This commit is contained in:
committed by
Daniel Wagner
parent
8ba1ce52e8
commit
546b51f450
@@ -30,7 +30,12 @@ import sys
|
||||
import collections
|
||||
import functools
|
||||
import logging
|
||||
from distutils.version import StrictVersion
|
||||
try:
|
||||
# pylint: disable=no-name-in-module
|
||||
from distutils.version import StrictVersion
|
||||
except ImportError as exc:
|
||||
logging.error("Could not import StrictVersion")
|
||||
raise exc
|
||||
|
||||
from . import __version__, __compatible_version__
|
||||
|
||||
@@ -250,15 +255,14 @@ class GlobalIncludes(IncludeHandler):
|
||||
else:
|
||||
dest[key] = upd[key]
|
||||
return dest
|
||||
else:
|
||||
try:
|
||||
for k in upd:
|
||||
dest[k] = upd[k]
|
||||
except AttributeError:
|
||||
# this mapping is not a dict
|
||||
for k in upd:
|
||||
dest[k] = upd[k]
|
||||
return dest
|
||||
try:
|
||||
for k in upd:
|
||||
dest[k] = upd[k]
|
||||
except AttributeError:
|
||||
# this mapping is not a dict
|
||||
for k in upd:
|
||||
dest[k] = upd[k]
|
||||
return dest
|
||||
|
||||
configs, missing_repos = _internal_include_handler(self.top_file)
|
||||
config = functools.reduce(_internal_dict_merge,
|
||||
|
Reference in New Issue
Block a user