Skip to content

Commit

Permalink
Re-enabling spell check
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
richtja committed Jul 10, 2024
1 parent 0c1a304 commit a50d623
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 11 deletions.
2 changes: 1 addition & 1 deletion avocado/core/dependencies/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# See LICENSE for more details.
#
# Copyright: Red Hat Inc. 2024
# Authors: Jan Richter <jarcihte@redhat.com>
# Authors: Jan Richter <jarichte@redhat.com>


class Dependency:
Expand Down
2 changes: 1 addition & 1 deletion avocado/core/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -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][,...]]
Expand Down
2 changes: 1 addition & 1 deletion avocado/utils/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion avocado/utils/multipath.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
"""
Expand Down
12 changes: 6 additions & 6 deletions avocado/utils/nvme.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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)
Expand Down Expand Up @@ -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")
Expand All @@ -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
"""
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion selftests/spell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
18 changes: 18 additions & 0 deletions spell.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a50d623

Please sign in to comment.