aboutsummaryrefslogtreecommitdiffstats
path: root/packaging-tools/bld_openssl.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/bld_openssl.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/bld_openssl.py')
-rw-r--r--packaging-tools/bld_openssl.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/packaging-tools/bld_openssl.py b/packaging-tools/bld_openssl.py
index 0dc6d9132..95b77b781 100644
--- a/packaging-tools/bld_openssl.py
+++ b/packaging-tools/bld_openssl.py
@@ -65,7 +65,7 @@ def check_environment():
def check_cmd(cmd):
if subprocess.call(cmd, stdout=fnull, stderr=fnull) != 0:
print(f"*** Cannot execute {cmd[0]}")
- exit(1)
+ sys.exit(1)
check_cmd(['nasm', '-h'])
check_cmd(['nmake', '/?'])
check_cmd(['7z'])
@@ -96,7 +96,7 @@ def main() -> None:
parser = setup_argument_parser()
args = parser.parse_args()
- if args.toolset != 'VC-WIN32' and args.toolset != 'VC-WIN64A':
+ if args.toolset not in ('VC-WIN32', 'VC-WIN64A'):
print('*** --toolset must be either VC-WIN32 or VC-WIN64A')
sys.exit(1)