diff options
author | Patrik Teivonen <patrik.teivonen@qt.io> | 2022-05-25 14:14:19 +0300 |
---|---|---|
committer | Patrik Teivonen <patrik.teivonen@qt.io> | 2022-08-05 09:33:47 +0000 |
commit | 506b1fe037a1b4fd6f3aec7862ca3fa2ea35006b (patch) | |
tree | b0ff3247aa5b4f5081c17149b9463ea6fcef8636 /packaging-tools/send_header_diff_kmail.py | |
parent | 6099b89f35499c60eb0ed4be10e40966326ea678 (diff) |
Make imports consistent across Python scripts, isort hookv6.4.0-beta3-packaging
-Add isort to Pipfile, isort hook with blackformatter profile
-Fix imports in unittest hook
-Group and sort imports by their category (PEP8)
-Blank line between import groups (PEP8)
-Move all imports to toplevel (PEP8)
-Don't unnecessarily append to sys.path (PEP8)
-Import only required functions (this also helps reduce line length)
-Update deprecated imports such as builtins.WindowsError, ConfigParser.readfp
-Remove Python 2, cyclic and unused imports
-Fix platform dependent imports and remove unnecessaty try-excepts
-Remove unnecessary comments before imports, use in-line comments when needed
-Rename conflicting functions in imports, variables as absolute imports are recommended (PEP8)
Change-Id: I5ac7a3499ea47a6bdc9a9a2b5211841f65c011ea
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
Diffstat (limited to 'packaging-tools/send_header_diff_kmail.py')
-rwxr-xr-x | packaging-tools/send_header_diff_kmail.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packaging-tools/send_header_diff_kmail.py b/packaging-tools/send_header_diff_kmail.py index 45f2334e7..10c3cba0b 100755 --- a/packaging-tools/send_header_diff_kmail.py +++ b/packaging-tools/send_header_diff_kmail.py @@ -53,8 +53,8 @@ import argparse import os -import subprocess import sys +from subprocess import check_call def send_headers(version, message_id, simulate): @@ -72,7 +72,7 @@ def send_headers(version, message_id, simulate): if simulate: print("Simulate:", " ".join(args)) else: - subprocess.check_call(args) + check_call(args) if __name__ == "__main__": |