]> xenbits.xensource.com Git - xtf.git/commitdiff
CI: Use reorder-python-imports
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 8 Jan 2024 14:35:39 +0000 (14:35 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 8 Jan 2024 14:40:12 +0000 (14:40 +0000)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
.pre-commit-config.yaml
build/mkcfg.py
build/mkinfo.py
xtf-runner

index 81a712109d5d908fd83c177045cc15c92b596539..2f1c3ce42ed68f6771596e78359b3a0f9c89d355 100644 (file)
@@ -28,6 +28,11 @@ repos:
         args: ['--fix=lf']
     -   id: trailing-whitespace
 
+-   repo: https://github.com/asottile/reorder-python-imports
+    rev: v3.12.0
+    hooks:
+    -   id: reorder-python-imports
+
 -   repo: local
     hooks:
     -   id: git-diff # https://github.com/pre-commit/pre-commit/issues/1712
index 7f8e3d52051fc23794b50d902cb32c5b077ca2c3..c1a2e193dd62b34a1f17cf5ebc9a280176715322 100755 (executable)
@@ -1,12 +1,11 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
-
 """
 Construct an xl configuration file for a test (from various fragments), and
 substitue variables appropriately.
 """
-
-import sys, os
+import os
+import sys
 
 # Usage: mkcfg.py $OUT $DEFAULT-CFG $EXTRA-CFG $VARY-CFG
 _, out, defcfg, vcpus, extracfg, varycfg = sys.argv
index 50819e2c53cafe44aaaa8cbeecdb033ada2118fe..1c9c1ad17d8362b8b39641d7d606eb082a819fbe 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
-
-import sys, json
+import json
+import sys
 
 # Usage: mkcfg.py $OUT $NAME $CATEGORY $ENVS $VARIATIONS
 _, out, name, cat, envs, variations = sys.argv
index 772e6880fc866f6a7a4cb35aab76b734c6dc2477..138f3b1cfeb98757dd9d91ecb66dcdda1c9bbe2f 100755 (executable)
@@ -1,18 +1,17 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
-
 """
 xtf-runner - A utility for enumerating and running XTF tests.
 
 Currently assumes the presence and availability of the `xl` toolstack.
 """
-
-from __future__ import print_function, unicode_literals
+from __future__ import print_function
+from __future__ import unicode_literals
 
 import json
-import sys, os
+import os
 import subprocess
-
+import sys
 from functools import partial
 from optparse import OptionParser
 from os import path