[orca/570658-whereami] Pylinting



commit d9317d0d9a96516c1399174e96c41f3474ae1b20
Author: Willie Walker <william walker sun com>
Date:   Fri Jun 5 21:40:05 2009 -0400

    Pylinting
---
 src/orca/scripts/apps/notify-osd.py |    1 -
 src/orca/speech_generator.py        |    8 ++++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/orca/scripts/apps/notify-osd.py b/src/orca/scripts/apps/notify-osd.py
index eefffe7..5177df0 100644
--- a/src/orca/scripts/apps/notify-osd.py
+++ b/src/orca/scripts/apps/notify-osd.py
@@ -28,7 +28,6 @@ __license__   = "LGPL"
 
 import orca.default as default
 import orca.speech as speech
-import pyatspi
 
 from orca.orca_i18n import _
 
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index d0a2a75..a12e1bd 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -57,6 +57,10 @@ def _formatExceptionInfo(maxTBlevel=5):
 # apply to the object.  This would allow us to reduce the number of strings
 # needed in formatting.py.]]]
 
+# The prefix to use for the individual generator methods
+#
+METHOD_PREFIX = "_generate"
+
 class SpeechGenerator:
     """Takes accessible objects and produces a string to speak for
     those objects.  See the generateSpeech method, which is the primary
@@ -88,11 +92,11 @@ class SpeechGenerator:
     def __init__(self, script):
         self._script = script
         self._methodsDict = {}
-        METHOD_PREFIX = "_generate"
         for method in \
             filter(lambda z: callable(z),
                    map(lambda y: getattr(self, y).__get__(self, self.__class__),
-                       filter(lambda x: x.startswith(METHOD_PREFIX), dir(self)))):
+                       filter(lambda x: x.startswith(METHOD_PREFIX),
+                                        dir(self)))):
             name = method.__name__[len(METHOD_PREFIX):]
             name = name[0].lower() + name[1:]
             self._methodsDict[name] = method



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]