aboutsummaryrefslogtreecommitdiffstats
path: root/packaging-tools/sdkcomponent.py
diff options
context:
space:
mode:
authorPatrik Teivonen <patrik.teivonen@qt.io>2022-07-05 14:19:26 +0300
committerPatrik Teivonen <patrik.teivonen@qt.io>2022-09-11 21:39:07 +0000
commit6eb9237645e0ad29afa699b714840eaf338266e2 (patch)
tree43f88073f84da62ef56a4527c77efa3ee2a71de8 /packaging-tools/sdkcomponent.py
parent2083a9e4f96f710946c9ca679b79f64570741df4 (diff)
pylint: Add miscellaneous checksv6.4.0-rc1-packaging
Add comment about disabled checks in pylint hook and enable all default pylint checks except for those. Address these miscellaneous pylint warnings: -C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) -R1714: Consider merging these comparisons with "in" (consider-using-in) -R1722: Consider using sys.exit() (consider-using-sys-exit) -C0206: Consider iterating with .items() (consider-using-dict-items) -R1710: All return statements in a function should return an expression. (inconsistent-return-statements) -W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from) -W1510: Using subprocess.run without explicitly set `check` is not recommended. (subprocess-run-check) -W0102: Dangerous default value as argument (dangerous-default-value) -W1508: os.getenv default type is builtins.bool. Expected str or None. (invalid-envvar-default) -W0212: Access to a protected member of a client class (protected-access) -W0631: Using possibly undefined loop variable (undefined-loop-variable) -W1113: Keyword argument before variable positional arguments list in the definition of __init__ function (keyword-arg-before-vararg) -W0201: Attribute defined outside __init__ (attribute-defined-outside-init) -W0221: Number of parameters in overridden method differ (arguments-differ) -C0202: Class method should have 'cls' as first argument (bad-classmethod-argument) -W1505: Using deprecated method currentThread() (deprecated-method) -R1707: Disallow trailing comma tuple (trailing-comma-tuple) -W0603: Using the global statement (global-statement) -W0602: Using global for 'OUTPUT_STATES' but no assignment is done (global-variable-not-assigned) -C2801: Unnecessarily calls dunder method __contains__. Use in keyword. Change-Id: Ia1c6ff3f6c328a94b40a1c0f11c83151abc91423 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'packaging-tools/sdkcomponent.py')
-rw-r--r--packaging-tools/sdkcomponent.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/packaging-tools/sdkcomponent.py b/packaging-tools/sdkcomponent.py
index 0c32efaf6..0594736f5 100644
--- a/packaging-tools/sdkcomponent.py
+++ b/packaging-tools/sdkcomponent.py
@@ -82,6 +82,7 @@ class SdkComponent:
return '*** Archive check fail! ***\n*** Unable to locate archive: ' + self.archive_uri
elif not os.path.isfile(self.archive_uri):
return '*** Archive check fail! ***\n*** Unable to locate archive: ' + self.archive_uri
+ return None
def path_leaf(self, path):
head, tail = ntpath.split(path)
@@ -134,7 +135,7 @@ class SdkComponent:
self.version = self.version.replace(item[0], item[1])
def is_root_component(self):
- if self.root_component == 'yes' or self.root_component == 'true':
+ if self.root_component in ('yes', 'true'):
return True
return False