Fix several typos
Bug: https://fedorahosted.org/kitchen/ticket/8 Patch-Name: fix_typos
This commit is contained in:
parent
2faeac3a1a
commit
e99dd6fa94
8 changed files with 14 additions and 14 deletions
|
@ -31,5 +31,5 @@ New API Feature Ver
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
|
|
||||||
The stdlib :mod:`subprocess` documenation
|
The stdlib :mod:`subprocess` documentation
|
||||||
For complete documentation on how to use subprocess
|
For complete documentation on how to use subprocess
|
||||||
|
|
|
@ -581,7 +581,7 @@ you should consider when designing a :class:`unicode`-only API:
|
||||||
that you may not have thought of. Corner cases in these other places may
|
that you may not have thought of. Corner cases in these other places may
|
||||||
mean that processing bytes is desirable.
|
mean that processing bytes is desirable.
|
||||||
2. In python2, byte :class:`str` and :class:`unicode` are often used
|
2. In python2, byte :class:`str` and :class:`unicode` are often used
|
||||||
interchangably with each other. That means that people programming against
|
interchangeably with each other. That means that people programming against
|
||||||
your API may have received :class:`str` from some other API and it would be
|
your API may have received :class:`str` from some other API and it would be
|
||||||
most convenient for their code if your API accepted it.
|
most convenient for their code if your API accepted it.
|
||||||
|
|
||||||
|
|
|
@ -272,7 +272,7 @@ version.
|
||||||
Criteria for subpackages in kitchen
|
Criteria for subpackages in kitchen
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
Supackages within kitchen should meet these criteria:
|
Subpackages within kitchen should meet these criteria:
|
||||||
|
|
||||||
* Generally useful or needed for other pieces of kitchen.
|
* Generally useful or needed for other pieces of kitchen.
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ In python-2.x, there's two types that deal with text.
|
||||||
with byte :class:`str` as those devices are going to need to deal with
|
with byte :class:`str` as those devices are going to need to deal with
|
||||||
concrete implementations of what bytes represent your abstract characters.
|
concrete implementations of what bytes represent your abstract characters.
|
||||||
|
|
||||||
In the python2 world many APIs use these two classes interchangably but there
|
In the python2 world many APIs use these two classes interchangeably but there
|
||||||
are several important APIs where only one or the other will do the right
|
are several important APIs where only one or the other will do the right
|
||||||
thing. When you give the wrong type of string to an API that wants the other
|
thing. When you give the wrong type of string to an API that wants the other
|
||||||
type, you may end up with an exception being raised (:exc:`UnicodeDecodeError`
|
type, you may end up with an exception being raised (:exc:`UnicodeDecodeError`
|
||||||
|
@ -122,7 +122,7 @@ we're all set::
|
||||||
|
|
||||||
So that was simple, right? Well... there's one gotcha that makes things a bit
|
So that was simple, right? Well... there's one gotcha that makes things a bit
|
||||||
harder to debug sometimes. When you attempt to write non-:term:`ASCII`
|
harder to debug sometimes. When you attempt to write non-:term:`ASCII`
|
||||||
:class:`unicode` strings to a file-like object you get a traceback everytime.
|
:class:`unicode` strings to a file-like object you get a traceback every time.
|
||||||
But what happens when you use :func:`print`? The terminal is a file-like object
|
But what happens when you use :func:`print`? The terminal is a file-like object
|
||||||
so it should raise an exception right? The answer to that is....
|
so it should raise an exception right? The answer to that is....
|
||||||
*sometimes*:
|
*sometimes*:
|
||||||
|
@ -539,7 +539,7 @@ a short example that uses many kitchen functions to do its work::
|
||||||
# Note that we do not let implici type conversion from str to
|
# Note that we do not let implici type conversion from str to
|
||||||
# unicode transform b_filename into a unicode string. That might
|
# unicode transform b_filename into a unicode string. That might
|
||||||
# fail as python would use the ASCII filename. Instead we use
|
# fail as python would use the ASCII filename. Instead we use
|
||||||
# to_unicode() to explictly transform in a way that we know will
|
# to_unicode() to explicitly transform in a way that we know will
|
||||||
# not traceback.
|
# not traceback.
|
||||||
print _(u'filename: %s') % to_unicode(b_filename)
|
print _(u'filename: %s') % to_unicode(b_filename)
|
||||||
print _(u'file size: %s') % size
|
print _(u'file size: %s') % size
|
||||||
|
|
|
@ -295,8 +295,8 @@ class DummyTranslations(object, gettext.NullTranslations):
|
||||||
def _reencode_if_necessary(self, message, output_encoding):
|
def _reencode_if_necessary(self, message, output_encoding):
|
||||||
'''Return a byte string that's valid in a specific charset.
|
'''Return a byte string that's valid in a specific charset.
|
||||||
|
|
||||||
.. warning:: This method may mangle the message if the inpput encoding
|
.. warning:: This method may mangle the message if the input encoding
|
||||||
is not known or the message isn't represntable in the chosen
|
is not known or the message isn't representable in the chosen
|
||||||
output encoding.
|
output encoding.
|
||||||
'''
|
'''
|
||||||
valid = False
|
valid = False
|
||||||
|
@ -721,7 +721,7 @@ def get_translation_object(domain, localedirs=tuple(), languages=None,
|
||||||
objects by default. These are superior to the
|
objects by default. These are superior to the
|
||||||
:class:`gettext.GNUTranslations` and :class:`gettext.NullTranslations`
|
:class:`gettext.GNUTranslations` and :class:`gettext.NullTranslations`
|
||||||
objects because they are consistent in the string type they return and
|
objects because they are consistent in the string type they return and
|
||||||
they fix several issues that can causethe |stdlib|_ objects to throw
|
they fix several issues that can cause the |stdlib|_ objects to throw
|
||||||
:exc:`UnicodeError`.
|
:exc:`UnicodeError`.
|
||||||
2. This function takes multiple directories to search for
|
2. This function takes multiple directories to search for
|
||||||
:term:`message catalogs`.
|
:term:`message catalogs`.
|
||||||
|
|
|
@ -73,7 +73,7 @@ the defaultdict class provided by python-2.5 and above.
|
||||||
|
|
||||||
# Pylint disabled messages
|
# Pylint disabled messages
|
||||||
#
|
#
|
||||||
# :C0103: We're defnining a compatible class name therefore we need to match
|
# :C0103: We're defining a compatible class name therefore we need to match
|
||||||
# the format of that name.
|
# the format of that name.
|
||||||
|
|
||||||
import types
|
import types
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Copyright (c) 2013 Red Hat, Inc.
|
# Copyright (c) 2013 Red Hat, Inc.
|
||||||
# Copyright (c) 2010 Ville Skyttä
|
# Copyright (c) 2010 Ville Skyttä
|
||||||
# Copyright (c) 2009 Tim Lauridsen
|
# Copyright (c) 2009 Tim Lauridsen
|
||||||
# Copyright (c) 2007 Marcus Kuhn
|
# Copyright (c) 2007 Markus Kuhn
|
||||||
#
|
#
|
||||||
# kitchen is free software; you can redistribute it and/or modify it under the
|
# kitchen is free software; you can redistribute it and/or modify it under the
|
||||||
# terms of the GNU Lesser General Public License as published by the Free
|
# terms of the GNU Lesser General Public License as published by the Free
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
#
|
#
|
||||||
# Authors:
|
# Authors:
|
||||||
# James Antill <james@fedoraproject.org>
|
# James Antill <james@fedoraproject.org>
|
||||||
# Marcus Kuhn
|
# Markus Kuhn
|
||||||
# Toshio Kuratomi <toshio@fedoraproject.org>
|
# Toshio Kuratomi <toshio@fedoraproject.org>
|
||||||
# Tim Lauridsen
|
# Tim Lauridsen
|
||||||
# Ville Skyttä
|
# Ville Skyttä
|
||||||
|
@ -211,7 +211,7 @@ def _generate_combining_table():
|
||||||
This is used to generate the :data:`~kitchen.text.display._COMBINING`
|
This is used to generate the :data:`~kitchen.text.display._COMBINING`
|
||||||
table.
|
table.
|
||||||
'''
|
'''
|
||||||
# Marcus Kuhn's sorted list of non-overlapping intervals of non-spacing
|
# Markus Kuhn's sorted list of non-overlapping intervals of non-spacing
|
||||||
# characters generated ifrom Unicode 5.0 data by:
|
# characters generated ifrom Unicode 5.0 data by:
|
||||||
# "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c"
|
# "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c"
|
||||||
markus_kuhn_combining_5_0 = (
|
markus_kuhn_combining_5_0 = (
|
||||||
|
|
|
@ -47,7 +47,7 @@ def main():
|
||||||
shutil.rmtree('locale')
|
shutil.rmtree('locale')
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
# If the error is that locale does not exist, we're okay. We're
|
# If the error is that locale does not exist, we're okay. We're
|
||||||
# deleting it here, afterall
|
# deleting it here, after all
|
||||||
if e.errno != 2:
|
if e.errno != 2:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue