From 4a795fb21a1dde1f400d0a928a7cd0918e4820bc Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Tue, 9 Nov 2021 20:35:04 +1100 Subject: [PATCH] docs: Fix a few typos There are small typos in: - examples/apps/3Ddrawing/3Ddrawing.py - examples/apps/mandelbrot/mandelbrot.py - pymt/cache.py - pymt/core/text/__init__.py - pymt/event.py - pymt/input/touch.py - pymt/tools/packaging/osx/build.py - pymt/tools/packaging/win32/build.py - pymt/ui/widgets/circularslider.py - pymt/ui/widgets/composed/vkeyboard.py - pymt/ui/widgets/layout/gridlayout.py - pymt/ui/widgets/scatter.py - pymt/ui/widgets/widget.py Fixes: - Should read `automatically` rather than `automaticly`. - Should read `propagating` rather than `porpagating`. - Should read `dependencies` rather than `dependencioes`. - Should read `absolutely` rather than `absolutly`. - Should read `retrieve` rather than `retreive`. - Should read `remember` rather than `remeber`. - Should read `reference` rather than `refernce`. - Should read `propagated` rather than `propogated`. - Should read `projection` rather than `pojection`. --- examples/apps/3Ddrawing/3Ddrawing.py | 2 +- examples/apps/mandelbrot/mandelbrot.py | 2 +- pymt/cache.py | 6 +++--- pymt/core/text/__init__.py | 2 +- pymt/event.py | 2 +- pymt/input/touch.py | 2 +- pymt/tools/packaging/osx/build.py | 2 +- pymt/tools/packaging/win32/build.py | 2 +- pymt/ui/widgets/circularslider.py | 2 +- pymt/ui/widgets/composed/vkeyboard.py | 2 +- pymt/ui/widgets/layout/gridlayout.py | 2 +- pymt/ui/widgets/scatter.py | 4 ++-- pymt/ui/widgets/widget.py | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/examples/apps/3Ddrawing/3Ddrawing.py b/examples/apps/3Ddrawing/3Ddrawing.py index 7007d012..5bea3c30 100644 --- a/examples/apps/3Ddrawing/3Ddrawing.py +++ b/examples/apps/3Ddrawing/3Ddrawing.py @@ -18,7 +18,7 @@ class GL3DPerspective: """ Handy Class for use with python 'with' statement. - on enter: sets the openGL pojection matrix to a standart perspective projection, enables, lighting, normalizing fo normals and depth test + on enter: sets the openGL projection matrix to a standart perspective projection, enables, lighting, normalizing fo normals and depth test on exit: restores matrices and states to what they were before """ def __init__(self, angle=60.0, aspect=4.0/3.0, near=1.0, far=100.0): diff --git a/examples/apps/mandelbrot/mandelbrot.py b/examples/apps/mandelbrot/mandelbrot.py index 00806d74..bf82a65f 100644 --- a/examples/apps/mandelbrot/mandelbrot.py +++ b/examples/apps/mandelbrot/mandelbrot.py @@ -111,7 +111,7 @@ def pymt_plugin_activate(w, ctx): slider = MTSlider(orientation='horizontal', min=25, max=250, value=100, size=(w.width-20, 30), pos=(10,10)) # attach the event handler to the slider - # uses curry to save the firt two arguments, since this is where we have the refernce to them + # uses curry to save the firt two arguments, since this is where we have the reference to them # and the on_value_changed event only provides on argument ('value') callback = curry(update_iterations, mbviewer, label) slider.push_handlers(on_value_change=callback) diff --git a/pymt/cache.py b/pymt/cache.py index 9197dbe5..f3dce605 100644 --- a/pymt/cache.py +++ b/pymt/cache.py @@ -1,5 +1,5 @@ ''' -Cache Manager: cache object and delete them automaticly +Cache Manager: cache object and delete them automatically How to use the cache :: # register a new Cache @@ -10,7 +10,7 @@ instance = MTLabel(label=label) Cache.append('mycache', label, instance) - # retreive the object later + # retrieve the object later instance = Cache.get('mycache', label) If the instance is NULL, the cache may have trash it, because you've @@ -185,7 +185,7 @@ def _purge_by_timeout(dt): # time to draw. and the timeout is not adapted to the current # framerate. So, increase the timeout by two. # ie: if the timeout is 1 sec, and framerate go to 0.7, newly - # object added will be automaticly trashed. + # object added will be automatically trashed. timeout *= 2 Cache._categories[category]['timeout'] = timeout continue diff --git a/pymt/core/text/__init__.py b/pymt/core/text/__init__.py index 7661348c..25fee232 100644 --- a/pymt/core/text/__init__.py +++ b/pymt/core/text/__init__.py @@ -376,7 +376,7 @@ def _get_label(self): def _set_label(self, label): if label == self._label: return - # try to automaticly decode unicode + # try to automatically decode unicode try: self._label = label.decode('utf8') except: diff --git a/pymt/event.py b/pymt/event.py index 83891e5e..37c1b4a2 100644 --- a/pymt/event.py +++ b/pymt/event.py @@ -325,7 +325,7 @@ def set_handler(self, name, handler): def dispatch_event(self, event_type, *args): '''Dispatch a single event to the attached handlers. - The event is propogated to all handlers from from the top of the stack + The event is propagated to all handlers from from the top of the stack until one returns `EVENT_HANDLED`. This method should be used only by `EventDispatcher` implementors; applications should call the ``dispatch_events`` method. diff --git a/pymt/input/touch.py b/pymt/input/touch.py index a6810a01..ffaed003 100644 --- a/pymt/input/touch.py +++ b/pymt/input/touch.py @@ -144,7 +144,7 @@ def depack(self, args): self.dszpos = self.oszpos = self.sz def grab(self, class_instance, exclusive=False): - '''Grab a touch. You can grab a touch if you absolutly want to receive + '''Grab a touch. You can grab a touch if you absolutely want to receive on_touch_move() and on_touch_up(), even if the touch is not dispatched by your parent :: diff --git a/pymt/tools/packaging/osx/build.py b/pymt/tools/packaging/osx/build.py index 41e82022..6caac19b 100644 --- a/pymt/tools/packaging/osx/build.py +++ b/pymt/tools/packaging/osx/build.py @@ -58,7 +58,7 @@ def report_hook(block_count, block_size, total_size): p = block_count*block_size*100.0/total_size print "\b\b\b\b\b\b\b\b\b", "%06.2f"%p +"%", print " Progress: 000.00%", - urlretrieve(self.deps_url, #location of binary dependencioes needed for portable pymt + urlretrieve(self.deps_url, #location of binary dependencies needed for portable pymt os.path.join(self.build_dir,'deps.zip'), #tmp file to store teh archive reporthook=report_hook) print " [Done]" diff --git a/pymt/tools/packaging/win32/build.py b/pymt/tools/packaging/win32/build.py index af5cc35a..346fce9f 100644 --- a/pymt/tools/packaging/win32/build.py +++ b/pymt/tools/packaging/win32/build.py @@ -73,7 +73,7 @@ def report_hook(block_count, block_size, total_size): p = block_count*block_size*100.0/total_size print "\b\b\b\b\b\b\b\b\b", "%06.2f"%p +"%", print " Progress: 000.00%", - urlretrieve(self.deps_url, #location of binary dependencioes needed for portable pymt + urlretrieve(self.deps_url, #location of binary dependencies needed for portable pymt os.path.join(self.build_dir,'deps.zip'), #tmp file to store teh archive reporthook=report_hook) print " [Done]" diff --git a/pymt/ui/widgets/circularslider.py b/pymt/ui/widgets/circularslider.py index 0ec5abe6..b9c2c3b3 100644 --- a/pymt/ui/widgets/circularslider.py +++ b/pymt/ui/widgets/circularslider.py @@ -20,7 +20,7 @@ class MTCircularSlider(MTWidget): .. warning:: The widget is drawed from his center. Cause of that, the size of the - widget will be automaticly adjusted from the radius of the slider. + widget will be automatically adjusted from the radius of the slider. Eg: if you ask for a radius=100, the widget size will be 200x200 :Parameters: diff --git a/pymt/ui/widgets/composed/vkeyboard.py b/pymt/ui/widgets/composed/vkeyboard.py index 2153b7b0..d9e2f00e 100644 --- a/pymt/ui/widgets/composed/vkeyboard.py +++ b/pymt/ui/widgets/composed/vkeyboard.py @@ -387,7 +387,7 @@ def _update(self): self._need_update = None def _do_update(self, mode=None): - # we absolutly want mode to update displaylist. + # we absolutely want mode to update displaylist. if mode not in ('background', 'keys'): return diff --git a/pymt/ui/widgets/layout/gridlayout.py b/pymt/ui/widgets/layout/gridlayout.py index 85eeef73..3715eab4 100644 --- a/pymt/ui/widgets/layout/gridlayout.py +++ b/pymt/ui/widgets/layout/gridlayout.py @@ -108,7 +108,7 @@ def update_minimum_size(self): for i in rows: height += rows[i] - #remeber for layout + #remember for layout self.col_widths = cols self.row_heights = rows diff --git a/pymt/ui/widgets/scatter.py b/pymt/ui/widgets/scatter.py index cd27bf93..bf10371f 100644 --- a/pymt/ui/widgets/scatter.py +++ b/pymt/ui/widgets/scatter.py @@ -415,7 +415,7 @@ def on_touch_move(self, touch): self.transform_with_touch (touch) self._last_touch_pos[touch] = touch.pos - # stop porpagating if its within our bounds + # stop propagating if its within our bounds if self.collide_point(x, y): return True @@ -436,7 +436,7 @@ def on_touch_up(self, touch): del self._last_touch_pos[touch] self._touches.remove(touch) - # stop porpagating if its within our bounds + # stop propagating if its within our bounds if self.collide_point(x, y): return True diff --git a/pymt/ui/widgets/widget.py b/pymt/ui/widgets/widget.py index 527fb0dd..b6d05302 100644 --- a/pymt/ui/widgets/widget.py +++ b/pymt/ui/widgets/widget.py @@ -166,7 +166,7 @@ def __init__(self, **kwargs): self._cls = '' self._inline_style = kwargs['style'] - # loading is done here automaticly + # loading is done here automatically self.cls = kwargs.get('cls') def _set_cls(self, cls):