From a50d6238f51f356b41a2b68dce09e516816b7cb0 Mon Sep 17 00:00:00 2001 From: Jan Richter Date: Wed, 26 Jun 2024 11:18:34 +0200 Subject: [PATCH] Re-enabling spell check The pylints spelling only check C0401 C0402 C0403, but `--errors-only` in the avocado spell check command line means pylint E rules only, therefore the avocado spell check is not working. This commit removes the `--errors-only` flag and fixes all spelling issues accumulated in avocado code. Signed-off-by: Jan Richter --- avocado/core/dependencies/dependency.py | 2 +- avocado/core/output.py | 2 +- avocado/utils/disk.py | 2 +- avocado/utils/multipath.py | 2 +- avocado/utils/nvme.py | 12 ++++++------ selftests/spell.sh | 2 +- spell.ignore | 18 ++++++++++++++++++ 7 files changed, 29 insertions(+), 11 deletions(-) diff --git a/avocado/core/dependencies/dependency.py b/avocado/core/dependencies/dependency.py index 4db0dce9c8..2f77c5763c 100644 --- a/avocado/core/dependencies/dependency.py +++ b/avocado/core/dependencies/dependency.py @@ -10,7 +10,7 @@ # See LICENSE for more details. # # Copyright: Red Hat Inc. 2024 -# Authors: Jan Richter +# Authors: Jan Richter class Dependency: diff --git a/avocado/core/output.py b/avocado/core/output.py index 86330fee25..9254e2166d 100644 --- a/avocado/core/output.py +++ b/avocado/core/output.py @@ -429,7 +429,7 @@ def del_last_configuration(): def split_loggers_and_levels(loggers): - """Separates logger names and legger levels. + """Separates logger names and logger levels. :param loggers: Logger names with or without levels :type loggers: List of strings in format STREAM[:LEVEL][,STREAM[:LEVEL][,...]] diff --git a/avocado/utils/disk.py b/avocado/utils/disk.py index 9954f3f37f..a2549fca45 100644 --- a/avocado/utils/disk.py +++ b/avocado/utils/disk.py @@ -417,7 +417,7 @@ def clean_disk(disk_name): def rescan_disk(disk_name): """ - Rescans disk + Re-scans disk :param disk_name: disk name :type disk_name: str diff --git a/avocado/utils/multipath.py b/avocado/utils/multipath.py index c1b43a7ac1..cc1efcefaa 100644 --- a/avocado/utils/multipath.py +++ b/avocado/utils/multipath.py @@ -235,7 +235,7 @@ def get_mpath_paths_status(wwid): """ Return the status of all paths of mpath device. - :param wwid: wwid or user friedly name of mpath. + :param wwid: wwid or user friendly name of mpath. Example: mpatha or 360050768108001b3a800000000000296 :return: Dict in the format of {path: (dm status, dev status, checker status)} """ diff --git a/avocado/utils/nvme.py b/avocado/utils/nvme.py index de46778e0c..84ae91895d 100644 --- a/avocado/utils/nvme.py +++ b/avocado/utils/nvme.py @@ -102,7 +102,7 @@ def get_current_ns_ids(controller_name): Returns the list of namespaces in the nvme controller :param controller_name: Name of the nvme controller like nvme0, nvme1 - :rtyp: list + :rtype: list """ cmd = f"nvme list-ns /dev/{controller_name}" namespaces = [] @@ -117,7 +117,7 @@ def get_current_ns_list(controller_name): Returns the list of namespaces in the nvme controller :param controller_name: Name of the nvme controller like nvme0, nvme1 - :rtyp: list + :rtype: list """ namespace_list = [] namespaces_ids = get_current_ns_ids(controller_name) @@ -283,7 +283,7 @@ def create_max_ns(controller_name, force): Creates maximum number of namespaces, with equal capacity :param controller_name: name of the controller like nvme0/nvme1 etc.. - :param force: if wants to create the namespace foce, then pass force=True + :param force: if wants to create the namespace force, then pass force=True """ if get_current_ns_list(controller_name) and not force: raise NvmeException("ns already exist, cannot create max_ns") @@ -299,8 +299,8 @@ def get_equal_ns_size(controller_name, ns_count): more than one namespace with equal sizes :param controller_name: name of the controller like nvme0/nvme1 etc... - :param ns_count: Number of namespaces you want to create with equal sixe - it should be less thans or eaqual to max ns supported + :param ns_count: Number of namespaces you want to create with equal sizes + it should be less than or equal to max ns supported on the controller :rtype: integer """ @@ -331,7 +331,7 @@ def get_free_space(controller_name): def create_namespaces(controller_name, ns_count): """ - creates eaqual n number of namespaces on the specified controller + creates equal n number of namespaces on the specified controller :param controller_name: name of the controller like nvme0 :param ns_count: number of namespaces to be created diff --git a/selftests/spell.sh b/selftests/spell.sh index 66b2755dec..9b7b0dc98b 100755 --- a/selftests/spell.sh +++ b/selftests/spell.sh @@ -3,4 +3,4 @@ echo "** Running spell check..." PYLINT=$(which pylint 2>/dev/null || python3 -m pylint) -${PYLINT} -j 1 --errors-only --disable=all --enable=spelling --spelling-dict=en_US --spelling-private-dict-file=spell.ignore * +${PYLINT} -j 1 --disable=all --enable=spelling --spelling-dict=en_US --spelling-private-dict-file=spell.ignore * diff --git a/spell.ignore b/spell.ignore index 67559a1613..ce975e40f7 100644 --- a/spell.ignore +++ b/spell.ignore @@ -759,3 +759,21 @@ ansible-module environ LXC rootfs +schemas +fn +zstd +Maram +Srimannarayana +Murthy +mpathx +ns +LBA +rescan +dom +iommu +submodule +lscpu +sfdisk +matplotlib +enum +bitwise