manifest: clean up some zephyr pylintrc complaints

Clean up the file based on what zephyr's pylintrc would have
complained about. There's one remaining issue, which is that
ManifestProject doesn't call Project.__init__(), but that should be
fixed with #327 instead.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2020-08-13 13:36:08 -07:00 committed by Marti Bolivar
parent f386606a1c
commit 8cc2127a41
1 changed files with 3 additions and 1 deletions

View File

@ -384,6 +384,7 @@ class ManifestImportFailed(Exception):
'''
def __init__(self, project: 'Project', filename: PathType):
super().__init__(project, filename)
self.project = project
self.filename = os.fspath(filename)
@ -397,6 +398,7 @@ class ManifestVersionError(Exception):
'''
def __init__(self, version: str, file: Optional[PathType] = None):
super().__init__(version, file)
self.version = version
'''The minimum version of west that was required.'''
@ -437,7 +439,7 @@ def _flags_ok(flags: ImportFlag) -> bool:
F_IP = ImportFlag.IGNORE_PROJECTS
if (flags & F_I) or (flags & F_IP):
return not (flags & F_FP)
return not flags & F_FP
elif flags & (F_FP | F_IP):
return bool((flags & F_FP) ^ (flags & F_IP))
else: