orca r4220 - branches/phase2/src/orca
- From: wwalker svn gnome org
- To: svn-commits-list gnome org
- Subject: orca r4220 - branches/phase2/src/orca
- Date: Mon, 15 Sep 2008 07:40:32 +0000 (UTC)
Author: wwalker
Date: Mon Sep 15 07:40:32 2008
New Revision: 4220
URL: http://svn.gnome.org/viewvc/orca?rev=4220&view=rev
Log:
Pylint'ing
Modified:
branches/phase2/src/orca/platform.py.in
branches/phase2/src/orca/script.py
branches/phase2/src/orca/script_manager.py
Modified: branches/phase2/src/orca/platform.py.in
==============================================================================
--- branches/phase2/src/orca/platform.py.in (original)
+++ branches/phase2/src/orca/platform.py.in Mon Sep 15 07:40:32 2008
@@ -46,4 +46,4 @@
print "version: %s" % version
print "prefix: %s" % prefix
print "package: %s" % package
- print "datadirname: %s" %datadirname
+ print "datadirname: %s" % datadirname
Modified: branches/phase2/src/orca/script.py
==============================================================================
--- branches/phase2/src/orca/script.py (original)
+++ branches/phase2/src/orca/script.py Mon Sep 15 07:40:32 2008
@@ -112,7 +112,7 @@
name = "None"
return "script %s (module=%s)" % (name, self.__module__)
- def _getPluginClasses(sef):
+ def _getPluginClasses(self):
"""Returns a list of classes to instantiante for plugins.
Subclasses should override this method to add their own
plugins. One of the things a subclass can do is obtain
@@ -159,7 +159,7 @@
"""
return {}
- def _getBrailleKeyRanges(self):
+ def getBrailleKeyRanges(self):
"""Gets the BrlAPI commands this script and all of its plugins
care about.
"""
@@ -167,14 +167,14 @@
for binding in self._brailleBindings:
keys.append(binding.command)
for plugin in self._plugins:
- keys += plugin._getBrailleKeyRanges()
+ keys += plugin.getBrailleKeyRanges()
return keys
def _setupBrailleKeyRanges(self):
"""Sets up the BrlAPI commands this script and all of its plugins
care about.
"""
- braille.setupKeyRanges(self._getBrailleKeyRanges())
+ braille.setupKeyRanges(self.getBrailleKeyRanges())
def _clearBrailleKeyRanges(self):
"""Clears the BrlAPI commands this script and all of its plugins
Modified: branches/phase2/src/orca/script_manager.py
==============================================================================
--- branches/phase2/src/orca/script_manager.py (original)
+++ branches/phase2/src/orca/script_manager.py Mon Sep 15 07:40:32 2008
@@ -411,6 +411,17 @@
and not inputEvent.pressed):
return
+ # We were getting pylint errors along the following lines for
+ # checks against the MouseButtonEvent:
+ #
+ # Instance of 'BrailleEvent' has no 'button' member
+ # Instance of 'KeyboardEvent' has no 'button' member
+ #
+ # Well, we're checking very hard to make sure things are
+ # MouseButton events, so we'll disable that message here.
+ #
+ # pylint: disable-msg=E1101
+
if not lastInputEvent \
or not isinstance(inputEvent, lastInputEvent.__class__):
self._clickCount = 1
@@ -419,6 +430,7 @@
or (lastInputEvent.modifiers != inputEvent.modifiers)):
self._clickCount = 1
elif isinstance(lastInputEvent, input_event.MouseButtonEvent) \
+ and isinstance(inputEvent, input_event.MouseButtonEvent) \
and (lastInputEvent.button != inputEvent.button):
self._clickCount = 1
elif isinstance(lastInputEvent, input_event.BrailleEvent) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]