From 79d6a07d6e1cd086da9805c7dfa5f22c01045602 Mon Sep 17 00:00:00 2001 From: krionbsd Date: Sun, 24 Nov 2019 17:38:35 +0100 Subject: [PATCH] Fix various typos in the comments --- salt/modules/zpool.py | 10 +++++----- salt/states/zpool.py | 6 +++--- salt/utils/zfs.py | 20 ++++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/salt/modules/zpool.py b/salt/modules/zpool.py index 64de2194f92c..bfd879d352d9 100644 --- a/salt/modules/zpool.py +++ b/salt/modules/zpool.py @@ -9,8 +9,8 @@ :platform: illumos,freebsd,linux .. versionchanged:: 2018.3.1 - Big refactor to remove duplicate code, better type converions and improved - consistancy in output. + Big refactor to remove duplicate code, better type conversions and improved + consistency in output. ''' from __future__ import absolute_import, print_function, unicode_literals @@ -143,7 +143,7 @@ def status(zpool=None): ## parse status output # NOTE: output is 'key: value' except for the 'config' key. - # mulitple pools will repeat the output, so if switch pools if + # multiple pools will repeat the output, so if switch pools if # we see 'pool:' current_pool = None current_prop = None @@ -195,7 +195,7 @@ def status(zpool=None): # NOTE: data is indented by 1 tab, then multiples of 2 spaces # to differential root vdev, vdev, and dev # - # we just strip the intial tab (can't use .strip() here) + # we just strip the initial tab (can't use .strip() here) if line[0] == "\t": line = line[1:] @@ -372,7 +372,7 @@ def list_(properties='size,alloc,free,cap,frag,health', zpool=None, parsable=Tru .. note:: - Multiple storage pool can be provded as a space separated list + Multiple storage pool can be provided as a space separated list CLI Example: diff --git a/salt/states/zpool.py b/salt/states/zpool.py index ca8dd86dc9f2..683f95f92ec2 100644 --- a/salt/states/zpool.py +++ b/salt/states/zpool.py @@ -9,8 +9,8 @@ .. versionadded:: 2016.3.0 .. versionchanged:: 2018.3.1 - Big refactor to remove duplicate code, better type converions and improved - consistancy in output. + Big refactor to remove duplicate code, better type conversions and improved + consistency in output. .. code-block:: yaml @@ -387,7 +387,7 @@ def absent(name, export=False, force=False): name : string name of storage pool export : boolean - export instread of destroy the zpool if present + export instead of destroy the zpool if present force : boolean force destroy or export diff --git a/salt/utils/zfs.py b/salt/utils/zfs.py index b0d1af15f3ec..628d2448fd53 100644 --- a/salt/utils/zfs.py +++ b/salt/utils/zfs.py @@ -123,7 +123,7 @@ def _property_parse_cmd(cmd, alias=None): # NOTE: parse output prop_hdr = [] for prop_data in _exec(cmd=cmd)['stderr'].split('\n'): - # NOTE: make the line data more managable + # NOTE: make the line data more manageable prop_data = prop_data.lower().split() # NOTE: skip empty lines @@ -217,7 +217,7 @@ def _command(source, command, flags=None, opts=None, cmd.append(flag) # NOTE: append options - # we pass through 'sorted' to garentee the same order + # we pass through 'sorted' to guarantee the same order if opts is None: opts = {} for opt in sorted(opts): @@ -228,7 +228,7 @@ def _command(source, command, flags=None, opts=None, cmd.append(to_str(val)) # NOTE: append filesystem properties (really just options with a key/value) - # we pass through 'sorted' to garentee the same order + # we pass through 'sorted' to guarantee the same order if filesystem_properties is None: filesystem_properties = {} for fsopt in sorted(filesystem_properties): @@ -239,7 +239,7 @@ def _command(source, command, flags=None, opts=None, )) # NOTE: append pool properties (really just options with a key/value) - # we pass through 'sorted' to garentee the same order + # we pass through 'sorted' to guarantee the same order if pool_properties is None: pool_properties = {} for fsopt in sorted(pool_properties): @@ -330,8 +330,8 @@ def property_data_zpool(): .. warning:: - This data is probed from the output of 'zpool get' with some suplimental - data that is hardcoded. There is no better way to get this informatio aside + This data is probed from the output of 'zpool get' with some supplemental + data that is hardcoded. There is no better way to get this information aside from reading the code. ''' @@ -387,8 +387,8 @@ def property_data_zfs(): .. warning:: - This data is probed from the output of 'zfs get' with some suplimental - data that is hardcoded. There is no better way to get this informatio aside + This data is probed from the output of 'zfs get' with some supplemental + data that is hardcoded. There is no better way to get this information aside from reading the code. ''' @@ -476,7 +476,7 @@ def to_bool_alt(value): def from_size(value): ''' - Convert zfs size (human readble) to python int (bytes) + Convert zfs size (human readable) to python int (bytes) ''' match_size = re_zfs_size.match(str(value)) if match_size: @@ -676,7 +676,7 @@ def parse_command_result(res, label=None): .. note:: - Output on failure is rather predicatable. + Output on failure is rather predictable. - retcode > 0 - each 'error' is a line on stderr - optional 'Usage:' block under those with hits