1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-03 03:42:35 +01:00

Pylint Fixes

Update our version of pylint to use the latest version and update the
codebase to comply with the majority of the updates.

For now disable the additional checks for `super-with-arguments`,
`useless-object-inheritance`, `raise-missing-from`, `no-else-raise`,
`no-else-break`, `no-else-continue` to be consistent with the existing
codebase.
This commit is contained in:
Marc Bonnici
2020-10-19 18:07:21 +01:00
committed by setrofim
parent fbd6f4e90c
commit fbb84eca72
22 changed files with 33 additions and 31 deletions

View File

@@ -335,7 +335,7 @@ def load_struct_from_yaml(filepath=None, text=None):
of basic Python types (strings, ints, lists, dicts, etc.)."""
# Import here to avoid circular imports
# pylint: disable=wrong-import-position,cyclic-import
# pylint: disable=wrong-import-position,cyclic-import, import-outside-toplevel
from wa.utils.serializer import yaml
if not (filepath or text) or (filepath and text):
@@ -361,7 +361,7 @@ def load_struct_from_file(filepath):
"""
extn = os.path.splitext(filepath)[1].lower()
if (extn == '.py') or (extn == '.pyc') or (extn == '.pyo'):
if extn in ('.py', '.pyc', '.pyo'):
return load_struct_from_python(filepath)
elif extn == '.yaml':
return load_struct_from_yaml(filepath)
@@ -718,7 +718,7 @@ def lock_file(path, timeout=30):
"""
# Import here to avoid circular imports
# pylint: disable=wrong-import-position,cyclic-import
# pylint: disable=wrong-import-position,cyclic-import, import-outside-toplevel
from wa.framework.exception import ResourceError
locked = False