mirror of https://github.com/kivy/kivy.git
pep8 fixes
This commit is contained in:
parent
ae55b72020
commit
88103c5571
|
@ -559,9 +559,8 @@ class TextInput(Widget):
|
||||||
if not self._label_cached:
|
if not self._label_cached:
|
||||||
self._get_line_options()
|
self._get_line_options()
|
||||||
text = text.replace('\t', ' ' * self.tab_width)
|
text = text.replace('\t', ' ' * self.tab_width)
|
||||||
if(not self.password):
|
if not self.password:
|
||||||
return self._label_cached.get_extents(text)[0]
|
return self._label_cached.get_extents(text)[0]
|
||||||
else:
|
|
||||||
return self._label_cached.get_extents('*' * len(text))[0]
|
return self._label_cached.get_extents('*' * len(text))[0]
|
||||||
|
|
||||||
def _do_blink_cursor(self, dt):
|
def _do_blink_cursor(self, dt):
|
||||||
|
@ -796,7 +795,7 @@ class TextInput(Widget):
|
||||||
def _create_line_label(self, text):
|
def _create_line_label(self, text):
|
||||||
# Create a label from a text, using line options
|
# Create a label from a text, using line options
|
||||||
ntext = text.replace('\n', '').replace('\t', ' ' * self.tab_width)
|
ntext = text.replace('\n', '').replace('\t', ' ' * self.tab_width)
|
||||||
if(self.password):
|
if self.password:
|
||||||
ntext = '*' * len(ntext)
|
ntext = '*' * len(ntext)
|
||||||
kw = self._get_line_options()
|
kw = self._get_line_options()
|
||||||
cid = '%s\0%s' % (ntext, str(kw))
|
cid = '%s\0%s' % (ntext, str(kw))
|
||||||
|
@ -983,11 +982,10 @@ class TextInput(Widget):
|
||||||
password = BooleanProperty(False)
|
password = BooleanProperty(False)
|
||||||
'''If True, the widget will display its characters as the character*.
|
'''If True, the widget will display its characters as the character*.
|
||||||
|
|
||||||
:data:`password` is a :class:`~kivy.properties.BooleanProperty`, default to
|
|
||||||
False
|
|
||||||
|
|
||||||
.. versionadded:: 1.1.2
|
.. versionadded:: 1.1.2
|
||||||
|
|
||||||
|
:data:`password` is a :class:`~kivy.properties.BooleanProperty`, default to
|
||||||
|
False
|
||||||
'''
|
'''
|
||||||
|
|
||||||
cursor_blink = BooleanProperty(False)
|
cursor_blink = BooleanProperty(False)
|
||||||
|
|
Loading…
Reference in New Issue