From b93098a4f2eab09d285b1552719a812e683504bf Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Wed, 6 Mar 2024 15:59:58 -0500 Subject: [PATCH] Add import order/style check with isort Avocado has been using isort to enforce one import order/code style for a long time, with very good results. Let's expand the same to Avocado-VT. With a common code style across Avocado and Avocado-VT it'll be easier to move libraries to the common autils repo. Reference: https://github.com/avocado-framework/autils/issues/3 Signed-off-by: Cleber Rosa --- virttest/cpu.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/virttest/cpu.py b/virttest/cpu.py index bfdfde7030..02450a74a3 100644 --- a/virttest/cpu.py +++ b/virttest/cpu.py @@ -15,25 +15,21 @@ # Author: Satheesh Rajendran -import re import json import logging +import os import platform +import re import time -import os import uuid import xml.etree.ElementTree as ET - +from avocado.core import exceptions from avocado.utils import cpu as utils +from avocado.utils import path, process from avocado.utils.software_manager import manager -from avocado.utils import process -from avocado.utils import path -from avocado.core import exceptions -from virttest import utils_misc -from virttest import libvirt_version -from virttest import data_dir +from virttest import data_dir, libvirt_version, utils_misc # lazy imports for dependencies that are not needed in all modes of use # (as the cpu module is generic to qemu vm use only, libvirt is optional)