doc: installation, fix typo (#2041)

* doc: installation, fix typo

* Fix a lot of documentation/comment typos
This commit is contained in:
Torstein Husebø 2019-11-02 20:29:20 +01:00 committed by Philip Wellnitz
parent d6c06e002a
commit 15c611ca46
17 changed files with 35 additions and 35 deletions

View File

@ -53,7 +53,7 @@ Common configuration is a subdictionary that is a value of ``common`` key in
``ambiwidth``
Tells powerline what to do with characters with East Asian Width Class
Ambigious (such as Euro, Registered Sign, Copyright Sign, Greek
Ambiguous (such as Euro, Registered Sign, Copyright Sign, Greek
letters, Cyrillic letters). Valid values: any positive integer; it is
suggested that this option is only set it to 1 (default) or 2.
@ -132,7 +132,7 @@ Common configuration is a subdictionary that is a value of ``common`` key in
``interval``
Number, determines time (in seconds) between checks for changed
configuration. Checks are done in a seprate thread. Use ``null`` to check
configuration. Checks are done in a separate thread. Use ``null`` to check
for configuration changes on ``.render()`` call in main thread.
Defaults to ``None``.
@ -245,7 +245,7 @@ Color definitions
gradient, and the value is a list containing one or two items, second item
is optional:
* A list of cterm color indicies.
* A list of cterm color indices.
* A list of hex color strings.
It is expected that gradients are defined from least alert color to most
@ -388,7 +388,7 @@ ascii Theme without any unicode characters at all
``cursor_columns``
Space reserved for user input in shell bindings. Unlike :ref:`cursor_space
<config-themes-cursor_space>` it is measured in absolute amout of columns.
<config-themes-cursor_space>` it is measured in absolute amount of columns.
.. _config-themes-segment_data:

View File

@ -62,7 +62,7 @@ with any coding font.
mv PowerlineSymbols.otf ~/.local/share/fonts/
#. Update font cache for the path the font was moved to (root priveleges may be
#. Update font cache for the path the font was moved to (root privileges may be
needed to update cache for the system-wide paths)::
fc-cache -vf ~/.local/share/fonts/

View File

@ -53,7 +53,7 @@ diagnose this problem you may do the following:
startup or, at least, that it was cleaned after update. While different
``$POWERLINE_COMMAND`` variable should not cause any troubles most of time
(and when it will cause troubles are rather trivial) spoiled
``$PROMPT_COMMAND`` may lead to strange error messages or absense of exit
``$PROMPT_COMMAND`` may lead to strange error messages or absence of exit
code reporting.
These are the sources which may keep outdated environment variables:

View File

@ -375,13 +375,13 @@ def gen_module_attr_getter(pl, import_paths, imported_modules):
:param str module:
Module name, will be passed as first argument to ``__import__``.
:param str attr:
Module attribute, will be passed to ``__import__`` as the only value
Module attribute, will be passed to ``__import__`` as the only value
in ``fromlist`` tuple.
:return:
Attribute value or ``None``. Note: there is no way to distinguish
between successfull import of attribute equal to ``None`` and
unsuccessfull import.
between successful import of attribute equal to ``None`` and
unsuccessful import.
'''
oldpath = sys.path
sys.path = import_paths + sys.path
@ -473,7 +473,7 @@ class Powerline(object):
__init__ function only stores the arguments and runs this function. This
function exists for powerline to be able to reload itself: it is easier
to make ``__init__`` store arguments and call overriddable ``init`` than
to make ``__init__`` store arguments and call overridable ``init`` than
tell developers that each time they override Powerline.__init__ in
subclasses they must store actual arguments.
'''
@ -706,7 +706,7 @@ class Powerline(object):
'''Run component-specific setup
:param set components:
Set of the enabled componets or None.
Set of the enabled components or None.
Should be overridden by subclasses.
'''

View File

@ -47,7 +47,7 @@ def get_argparser(ArgumentParser=ConfigArgParser):
parser.add_argument(
'-p', '--config-path', action='append', metavar='PATH',
help='Path to configuration directory. If it is present '
'then configuration files will only be seeked in the provided path. '
'then configuration files will only be sought in the provided path. '
'May be provided multiple times to search in a list of directories.'
)
subparsers = parser.add_subparsers()

View File

@ -146,13 +146,13 @@ def get_argparser(ArgumentParser=argparse.ArgumentParser):
help='Like above, but provides argument for renderer. Is supposed '
'to be used only by shell bindings to provide various data like '
'last-exit-code or last-pipe-status (they are not using '
'`--renderer-arg\' for historical resons: `--renderer-arg\' '
'`--renderer-arg\' for historical reasons: `--renderer-arg\' '
'was added later).'
)
parser.add_argument(
'-p', '--config-path', action='append', metavar='PATH',
help='Path to configuration directory. If it is present then '
'configuration files will only be seeked in the provided path. '
'configuration files will only be sought in the provided path. '
'May be provided multiple times to search in a list of directories.'
)
parser.add_argument(

View File

@ -227,7 +227,7 @@ _strwidth_documentation = (
character sets because they have explicit fullwidth or wide
counterparts. All of ASCII is an example of East Asian
Narrow characters.
A 1 or 2 Ambigious: characters that may sometimes be wide and
A 1 or 2 Ambiguous: characters that may sometimes be wide and
sometimes narrow. Ambiguous characters require additional
information not contained in the character code to further
resolve their width. This information is usually defined in

View File

@ -154,7 +154,7 @@ def get_file_status(directory, dirstate_file, file_path, ignore_file_name, get_f
except OSError as e:
if getattr(e, 'errno', None) != errno.ENOENT:
raise
# Do not call get_func again for a non-existant file
# Do not call get_func again for a non-existent file
if keypath not in file_status_cache:
file_status_cache[keypath] = get_func(directory, file_path)
return file_status_cache[keypath]

View File

@ -171,7 +171,7 @@ except ImportError:
@staticmethod
def ignore_event(path, name):
# Ignore changes to the index.lock file, since they happen
# frequently and dont indicate an actual change in the working tree
# frequently and don't indicate an actual change in the working tree
# status
return path.endswith('.git') and name == 'index.lock'

View File

@ -29,7 +29,7 @@ class INotifyFileWatcher(INotify):
def process_event(self, wd, mask, cookie, name):
if wd == -1 and (mask & self.Q_OVERFLOW):
# We missed some INOTIFY events, so we dont
# We missed some INOTIFY events, so we don't
# know the state of any tracked files.
for path in tuple(self.modified):
if os.path.exists(path):
@ -114,7 +114,7 @@ class INotifyFileWatcher(INotify):
self.expire_watches()
if path not in self.watches:
# Try to re-add the watch, it will fail if the file does not
# exist/you dont have permission
# exist/you don't have permission
self.watch(path)
return True
self.read(get_name=False)
@ -187,7 +187,7 @@ class INotifyTreeWatcher(INotify):
raise NoSuchDir('The dir {0} does not exist'.format(base))
return
if e.errno == errno.EACCES:
# We silently ignore entries for which we dont have permission,
# We silently ignore entries for which we don't have permission,
# unless they are the top level dir
if top_level:
raise NoSuchDir('You do not have permission to monitor {0}'.format(base))
@ -235,7 +235,7 @@ class INotifyTreeWatcher(INotify):
def process_event(self, wd, mask, cookie, name):
if wd == -1 and (mask & self.Q_OVERFLOW):
# We missed some INOTIFY events, so we dont
# We missed some INOTIFY events, so we don't
# know the state of any tracked dirs.
self.watch_tree()
self.modified = True

View File

@ -401,7 +401,7 @@ def check_segment_function(function_name, data, context, echoerr):
context='Error while checking theme (key {key})'.format(key=context.key),
context_mark=function_name.mark,
problem=(
'found highlight group definition in addition to sentense stating that '
'found highlight group definition in addition to sentence stating that '
'no highlight groups are used'
),
problem_mark=mark,
@ -425,7 +425,7 @@ def check_segment_function(function_name, data, context, echoerr):
context='Error while checking theme (key {key})'.format(key=context.key),
context_mark=function_name.mark,
problem=(
'found sentense stating that no highlight groups are used '
'found sentence stating that no highlight groups are used '
'in addition to highlight group definition'
),
problem_mark=mark,

View File

@ -264,7 +264,7 @@ class Spec(object):
:param func msg_func:
Callable like ``msg_func`` from :py:meth:`Spec.check_func`. Should
accept one problematic item and is not used for :py:class:`Spec`
object indicies in ``item_func`` method.
object indices in ``item_func`` method.
:return: proceed, hadproblem.
'''
@ -515,7 +515,7 @@ class Spec(object):
optional. Each element in this list describes element with the same
index in the checked value. Check out :py:meth:`Spec.check_tuple`
for more details, but note that there list of specifications is
replaced with start and end indicies in ``self.specs``.
replaced with start and end indices in ``self.specs``.
:return: self.
'''
@ -633,7 +633,7 @@ class Spec(object):
Check out :py:meth:`Spec.check_either` method documentation for more
details, but note that there a list of specs was replaced by start and
end indicies in ``self.specs``.
end indices in ``self.specs``.
:return: self.
'''

View File

@ -114,7 +114,7 @@ class Renderer(object):
Object used for logging.
:param int ambiwidth:
Width of the characters with east asian width unicode attribute equal to
``A`` (Ambigious).
``A`` (Ambiguous).
:param dict options:
Various options. Are normally not used by base renderer, but all options
are recorded as attributes.
@ -173,7 +173,7 @@ class Renderer(object):
self.width_data = {
'N': 1, # Neutral
'Na': 1, # Narrow
'A': ambiwidth, # Ambigious
'A': ambiwidth, # Ambiguous
'H': 1, # Half-width
'W': 2, # Wide
'F': 2, # Fullwidth
@ -356,7 +356,7 @@ class Renderer(object):
segments_priority = iter(segments_priority)
if current_width > width and len(segments) > 100:
# When there are too many segments use faster, but less correct
# algorythm for width computation
# algorithm for width computation
diff = current_width - width
for segment in segments_priority:
segments.remove(segment)

View File

@ -21,7 +21,7 @@ class I3barRenderer(Renderer):
segment = {
'full_text': contents,
'separator': False,
'separator_block_width': 0, # no seperators
'separator_block_width': 0, # no separators
}
if fg is not None:

View File

@ -161,7 +161,7 @@ class CmusPlayerSegment(PlayerSegment):
cmus = with_docstring(CmusPlayerSegment(),
('''Return CMUS player information
Requires cmus-remote command be acessible from $PATH.
Requires cmus-remote command be accessible from $PATH.
{0}
''').format(_common_args.format('cmus')))
@ -228,7 +228,7 @@ mpd = with_docstring(MpdPlayerSegment(),
('''Return Music Player Daemon information
Requires ``mpd`` Python module (e.g. |python-mpd2|_ or |python-mpd|_ Python
package) or alternatively the ``mpc`` command to be acessible from $PATH.
package) or alternatively the ``mpc`` command to be accessible from $PATH.
.. |python-mpd| replace:: ``python-mpd``
.. _python-mpd: https://pypi.python.org/pypi/python-mpd

View File

@ -470,7 +470,7 @@ def col_current(pl, segment_info):
@window_cached
def virtcol_current(pl, gradient=True):
'''Return current visual column with concealed characters ingored
'''Return current visual column with concealed characters ignored
:param bool gradient:
Determines whether it should show textwidth-based gradient (gradient level is ``virtcol * 100 / textwidth``).
@ -764,7 +764,7 @@ def csv_col_current(pl, segment_info, display_name='auto', name_format=' ({colum
:param bool or str name:
May be ``True``, ``False`` and ``"auto"``. In the first case value from
the first raw will always be displayed. In the second case it will never
be displayed. In thi last case ``csv.Sniffer().has_header()`` will be
be displayed. In the last case ``csv.Sniffer().has_header()`` will be
used to detect whether current file contains header in the first column.
:param str name_format:
String used to format column name (in case ``display_name`` is set to

View File

@ -424,7 +424,7 @@ class TestLib(TestCase):
width_data = {
'N': 1, # Neutral
'Na': 1, # Narrow
'A': 1, # Ambigious
'A': 1, # Ambiguous
'H': 1, # Half-width
'W': 2, # Wide
'F': 2, # Fullwidth