summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Ivanov <pi@berkeley.edu>2014-02-20 23:40:24 -0800
committerPaul Ivanov <pi@berkeley.edu>2014-02-21 08:40:33 -0800
commit127ecfd29b51a5e72b87f70eaafb9fc0f6f2d870 (patch)
tree35d8b529ca38f0b992e5103083f1de8ffcdd7e6c
parent84b448a2ac8c9a91aaf935da1bad11cec28ac59f (diff)
downloadurwid-127ecfd29b51a5e72b87f70eaafb9fc0f6f2d870.tar.gz
fix lots of small typos
-rw-r--r--urwid/canvas.py2
-rwxr-xr-xurwid/container.py6
-rwxr-xr-xurwid/decoration.py6
-rwxr-xr-xurwid/graphics.py2
-rw-r--r--urwid/listbox.py2
-rwxr-xr-xurwid/old_str_util.py2
-rw-r--r--urwid/raw_display.py4
-rwxr-xr-xurwid/split_repr.py2
-rw-r--r--urwid/text_layout.py6
-rw-r--r--urwid/treetools.py2
-rw-r--r--urwid/util.py2
11 files changed, 18 insertions, 18 deletions
diff --git a/urwid/canvas.py b/urwid/canvas.py
index 593b252..d27e7ab 100644
--- a/urwid/canvas.py
+++ b/urwid/canvas.py
@@ -972,7 +972,7 @@ def shards_trim_top(shards, top):
shard_tail = shard_body_tail(num_rows, sbody)
top -= num_rows
else:
- raise CanvasError("tried to trim shards out of existance")
+ raise CanvasError("tried to trim shards out of existence")
sbody = shard_body(cviews, shard_tail, False)
shard_tail = shard_body_tail(num_rows, sbody)
diff --git a/urwid/container.py b/urwid/container.py
index 69a6110..aa81614 100755
--- a/urwid/container.py
+++ b/urwid/container.py
@@ -980,7 +980,7 @@ class Frame(Widget, WidgetContainerMixin):
This object may be used to read or update the contents of the Frame.
- The values are similar to the the list-like .contents objects used
+ The values are similar to the list-like .contents objects used
in other containers with (:class:`Widget`, options) tuples, but are
constrained to keys for each of the three usual parts of a Frame.
When other keys are used a :exc:`KeyError` will be raised.
@@ -1724,7 +1724,7 @@ class Columns(Widget, WidgetContainerMixin, WidgetContainerListContentsMixin):
are treated as box widgets, and *box_columns* is ignored.
If the Columns widget is treated as a flow widget then the rows
- are calcualated as the largest rows() returned from all columns
+ are calculated as the largest rows() returned from all columns
except the ones listed in *box_columns*. The box widgets in
*box_columns* will be displayed with this calculated number of rows,
filling the full height.
@@ -1972,7 +1972,7 @@ class Columns(Widget, WidgetContainerMixin, WidgetContainerListContentsMixin):
raise IndexError, "No Columns child widget at position %s" % (position,)
self.contents.focus = position
focus_position = property(_get_focus_position, _set_focus_position, doc="""
- index of child widget in focus. Raises IndexError if read when
+ index of child widget in focus. Raises :exc:`IndexError` if read when
Columns is empty, or when set to an invalid index.
""")
diff --git a/urwid/decoration.py b/urwid/decoration.py
index b6a5ea9..731eb91 100755
--- a/urwid/decoration.py
+++ b/urwid/decoration.py
@@ -310,7 +310,7 @@ class AttrWrap(AttrMap):
"""
Call getattr on wrapped widget. This has been the longstanding
behaviour of AttrWrap, but is discouraged. New code should be
- using AttrMap and .base_widget or .original_widget instad.
+ using AttrMap and .base_widget or .original_widget instead.
"""
return getattr(self._original_widget, name)
@@ -447,7 +447,7 @@ class Padding(WidgetDecoration):
:param left: a fixed number of columns to pad on the left
:type left: int
- :param right: a fixed number of columns to pad on thr right
+ :param right: a fixed number of columns to pad on the right
:type right: int
Clipping Mode: (width= ``'clip'``)
@@ -542,7 +542,7 @@ class Padding(WidgetDecoration):
def _get_width(self):
"""
- Return the padding widthment setting.
+ Return the padding width.
"""
return simplify_width(self._width_type, self._width_amount)
def _set_width(self, width):
diff --git a/urwid/graphics.py b/urwid/graphics.py
index adcff72..d3dd277 100755
--- a/urwid/graphics.py
+++ b/urwid/graphics.py
@@ -802,7 +802,7 @@ class ProgressBar(Widget):
def __init__(self, normal, complete, current=0, done=100, satt=None):
"""
- :param normal: display attribute for uncomplete part of progress bar
+ :param normal: display attribute for incomplete part of progress bar
:param complete: display attribute for complete part of progress bar
:param current: current progress
:param done: progress amount at 100%
diff --git a/urwid/listbox.py b/urwid/listbox.py
index e954f72..5370e23 100644
--- a/urwid/listbox.py
+++ b/urwid/listbox.py
@@ -821,7 +821,7 @@ class ListBox(Widget, WidgetContainerMixin):
of the focus widget is aligned with the top edge of the
listbox (default if unspecified)
:type offset_inset: int
- :param coming_from: eiter 'above', 'below' or unspecified `None`
+ :param coming_from: either 'above', 'below' or unspecified `None`
:type coming_from: str
:param cursor_coords: (x, y) tuple indicating the desired
column and row for the cursor, a (x,) tuple indicating only
diff --git a/urwid/old_str_util.py b/urwid/old_str_util.py
index f2b9287..bb993f6 100755
--- a/urwid/old_str_util.py
+++ b/urwid/old_str_util.py
@@ -297,7 +297,7 @@ def within_double_byte(text, line_start, pos):
Return values:
0 -- not within dbe char, or double_byte_encoding == False
1 -- pos is on the 1st half of a dbe char
- 2 -- pos is on the 2nd half og a dbe char
+ 2 -- pos is on the 2nd half of a dbe char
"""
assert isinstance(text, bytes)
v = ord2(text[pos])
diff --git a/urwid/raw_display.py b/urwid/raw_display.py
index b422c2c..f71175e 100644
--- a/urwid/raw_display.py
+++ b/urwid/raw_display.py
@@ -379,7 +379,7 @@ class Screen(BaseScreen, RealTerminal):
def _run_input_iter(self):
def empty_resize_pipe():
# clean out the pipe used to signal external event loops
- # that a resize has occured
+ # that a resize has occurred
try:
while True: os.read(self._resize_pipe_rd, 1)
except OSError:
@@ -931,7 +931,7 @@ class Screen(BaseScreen, RealTerminal):
"""
entries - list of (index, red, green, blue) tuples.
- Attempt to set part of the terminal pallette (this does not work
+ Attempt to set part of the terminal palette (this does not work
on all terminals.) The changes are sent as a single escape
sequence so they should all take effect at the same time.
diff --git a/urwid/split_repr.py b/urwid/split_repr.py
index 1438995..8b5e24c 100755
--- a/urwid/split_repr.py
+++ b/urwid/split_repr.py
@@ -128,7 +128,7 @@ def remove_defaults(d, fn):
if varargs:
del args[-1]
- # create adictionary of args with default values
+ # create a dictionary of args with default values
ddict = dict(zip(args[len(args) - len(defaults):], defaults))
for k, v in d.items():
diff --git a/urwid/text_layout.py b/urwid/text_layout.py
index 4a76cc8..302c504 100644
--- a/urwid/text_layout.py
+++ b/urwid/text_layout.py
@@ -125,7 +125,7 @@ class StandardTextLayout(TextLayout):
width - number of available screen columns
wrap - wrapping mode used
- Returns a layout structure without aligmnent applied.
+ Returns a layout structure without alignment applied.
"""
nl, nl_o, sp_o = "\n", "\n", " "
if PYTHON3 and isinstance(text, bytes):
@@ -320,7 +320,7 @@ def line_width( segs ):
Return the screen column width of one line of a text layout structure.
This function ignores any existing shift applied to the line,
- represended by an (amount, None) tuple at the start of the line.
+ represented by an (amount, None) tuple at the start of the line.
"""
sc = 0
seglist = segs
@@ -353,7 +353,7 @@ def shift_line( segs, amount ):
def trim_line( segs, text, start, end ):
"""
Return a trimmed line of a text layout structure.
- text -- text to which this layout structre applies
+ text -- text to which this layout structure applies
start -- starting screen column
end -- ending screen column
"""
diff --git a/urwid/treetools.py b/urwid/treetools.py
index 2f65e49..26f0914 100644
--- a/urwid/treetools.py
+++ b/urwid/treetools.py
@@ -69,7 +69,7 @@ class TreeWidget(urwid.WidgetWrap):
def update_expanded_icon(self):
"""Update display widget text for parent widgets"""
- # icon is first element in colums indented widget
+ # icon is first element in columns indented widget
self._w.base_widget.widget_list[0] = [
self.unexpanded_icon, self.expanded_icon][self.expanded]
diff --git a/urwid/util.py b/urwid/util.py
index 0560b5d..12becca 100644
--- a/urwid/util.py
+++ b/urwid/util.py
@@ -439,7 +439,7 @@ class MetaSuper(type):
def int_scale(val, val_range, out_range):
"""
Scale val in the range [0, val_range-1] to an integer in the range
- [0, out_range-1]. This implementaton uses the "round-half-up" rounding
+ [0, out_range-1]. This implementation uses the "round-half-up" rounding
method.
>>> "%x" % int_scale(0x7, 0x10, 0x10000)