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 /Pipfile | |
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 'Pipfile')
-rw-r--r-- | Pipfile | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -26,6 +26,7 @@ flake8 = "==4.0.1" black = ">=20.8b1" stestr = "==3.2.1" pre-commit = "==2.17.0" +isort = "==5.10.1" [requires] python_version = "3" |