diff --git a/kivy/_clock.pyx b/kivy/_clock.pyx index 853ec8584..f9875cb1c 100644 --- a/kivy/_clock.pyx +++ b/kivy/_clock.pyx @@ -239,7 +239,7 @@ cdef class CyClockBase(object): .. versionadded:: 1.0.5 - ..versionchanged:: 1.9.2 + .. versionchanged:: 1.9.2 ``interval`` has been added. If True, it create a event that is called every seconds similar to :meth:`schedule_interval`. Defaults to @@ -301,7 +301,7 @@ cdef class CyClockBase(object): If it's a callable, then the callable will be unscheduled if it was scheduled. - ..warning:: + .. warning:: Passing the callback function rather than the returned :class:`ClockEvent` will result in a significantly slower diff --git a/kivy/_event.pyx b/kivy/_event.pyx index 78188ad2f..8ba8bcc9d 100644 --- a/kivy/_event.pyx +++ b/kivy/_event.pyx @@ -843,6 +843,7 @@ cdef class EventDispatcher(ObjectWithUid): :: + >>> mywidget = Widget() >>> mywidget.create_property('custom') >>> mywidget.custom = True diff --git a/kivy/clock.py b/kivy/clock.py index 4a47bd7c3..dedcd6d0d 100644 --- a/kivy/clock.py +++ b/kivy/clock.py @@ -98,7 +98,7 @@ next frame even if you add a new callback with -1 from a running callback. However, :class:`Clock` has an iteration limit for these callbacks: it defaults to 10. -If you schedule a callback that schedules a callback that schedules a .. etc +If you schedule a callback that schedules a callback that schedules a ... etc more than 10 times, it will leave the loop and send a warning to the console, then continue after the next frame. This is implemented to prevent bugs from hanging or crashing the application. @@ -156,7 +156,7 @@ Even if x and y changes within one frame, the callback is only run once. :meth:`CyClockBase.create_trigger` has a timeout parameter that behaves exactly like :meth:`CyClockBase.schedule_once`. -..versionchanged:: 1.9.2 +.. versionchanged:: 1.9.2 :meth:`CyClockBase.create_trigger` now has a ``interval`` parameter. If False, the default, it'll create an event similar to @@ -168,7 +168,7 @@ Unscheduling An event scheduled with :meth:`CyClockBase.schedule_once`, :meth:`CyClockBase.schedule_interval`, or with -:meth:`CyClockBase.create_trigger`and then triggered can be unscheduled in +:meth:`CyClockBase.create_trigger` and then triggered can be unscheduled in multiple ways. E.g:: def my_callback(dt): diff --git a/kivy/core/window/__init__.py b/kivy/core/window/__init__.py index f688398b0..c814c4b29 100755 --- a/kivy/core/window/__init__.py +++ b/kivy/core/window/__init__.py @@ -285,7 +285,7 @@ class WindowBase(EventDispatcher): The *unicode* parameter has been deprecated in favor of codepoint, and will be removed completely in future versions. - `on_key_down`: key, scancode, codepoint + `on_key_down`: key, scancode, codepoint, modifier Fired when a key pressed. .. versionchanged:: 1.3.0 diff --git a/kivy/input/recorder.py b/kivy/input/recorder.py index 38dd91e8f..59d2b24b4 100644 --- a/kivy/input/recorder.py +++ b/kivy/input/recorder.py @@ -74,7 +74,7 @@ Let's say you want to save the angle and pressure of the touch, if available:: Or with modules variables:: - $ python main.py -m recorder,attrs=is_touch:sx:sy:angle:pressure,\ + $ python main.py -m recorder,attrs=is_touch:sx:sy:angle:pressure, \ profile_mask=pos:angle:pressure Known limitations diff --git a/kivy/parser.py b/kivy/parser.py index 4f0069370..cfa6c0409 100644 --- a/kivy/parser.py +++ b/kivy/parser.py @@ -103,7 +103,7 @@ def parse_bool(text): def parse_string(text): - '''Parse a string to a string (removing single and double quotes)''' + '''Parse a string to a string (removing single and double quotes).''' if len(text) >= 2 and text[0] in ('"', "'") and text[-1] in ('"', "'"): text = text[1:-1] return text.strip() diff --git a/kivy/uix/label.py b/kivy/uix/label.py index 7c1de6d9a..f8d6f3817 100644 --- a/kivy/uix/label.py +++ b/kivy/uix/label.py @@ -33,14 +33,14 @@ the text. For example, this label's size will be set to the text content (plus :attr:`~Label.padding`): -.. code-block:: python +.. code-block:: kv Label: size: self.texture_size This label's text will wrap at the specified width and be clipped to the height: -.. code-block:: python +.. code-block:: kv Label: text_size: cm(6), cm(4) @@ -51,7 +51,7 @@ This label's text will wrap at the specified width and be clipped to the height: Combine these concepts to create a Label that can grow vertically but wraps the text at a certain width: -.. code-block:: python +.. code-block:: kv Label: text_size: root.width, None @@ -74,7 +74,7 @@ which text is aligned. For instance, the following code binds this size to the size of the Label, so text will be aligned within the widget bounds. This will also automatically wrap the text of the Label to remain within this area. -.. code-block:: python +.. code-block:: kv Label: text_size: self.size @@ -177,7 +177,7 @@ and deploy it universally via kv: .. code-block:: kv