Anonymous avatar Anonymous committed d04480e

Fixed some (but not all) pylint complaints

Comments (0)

Files changed (2)

 
 from setuptools import setup, find_packages
 
-version = '1.1.1'
-long_description = open("README.txt").read()
-classifiers = [
+VERSION = '1.1.1'
+
+KEYWORDS = 'google reader client'
+DESCRIPTION = "Simple wrapper for Google Reader API."
+LONG_DESCRIPTION = open("README.txt").read()
+CLASSIFIERS = [
     "Programming Language :: Python",
     "Intended Audience :: Developers",
     "Topic :: Software Development :: Libraries :: Python Modules",
-    # TODO: Development Status, Environment, Topic
+    "Development Status :: 4 - Beta",
+    "Environment :: Console",
     ]
 
-setup(name='mekk.greader',
-      version=version,
-      description="Simple wrapper for Google Reader API.",
-      long_description=long_description,
-      classifiers=classifiers,
-      keywords='org',
+setup(name = 'mekk.greader',
+      version = VERSION,
+      description = DESCRIPTION,
+      long_description = LONG_DESCRIPTION,
+      classifiers = CLASSIFIERS,
+      keywords = KEYWORDS,
       license='BSD',
       author='Marcin Kasperski',
       author_email='Marcin.Kasperski@mekk.waw.pl',

src/mekk/greader/reader_client.py

 #DUMP_REPLIES = True
 
 class GoogleLoginFailed(Exception):
+    """
+    Exception raised on login failure and other authorization problems.
+    """
     pass
 class GoogleOperationFailed(Exception):
+    """
+    Exception raised when Google rejects some operation.
+    """
     pass
 
 #SOURCE = 'my-small-script'
 
     def tag_id(self, tag):
         """
-        Converts tag name (say "Życie: Polityka" into 
-        tag id (say "user/-/label/Życie: Polityka").
+        Converts tag name (say "Life: Politics" into 
+        tag id (say "user/joe/label/Life: Politics").
         
         If parameter is already in this form, leaves it as-is
         """
         return tag
 
     def get_my_id(self):
+        """
+        Returns true user identifier to be used in API calls, calculating
+        it if necessary. Caches the result
+        """
         if self.my_id == '-':
             tl = self.get_tag_list()
             for vl in tl['tags']:
             self.cached_token_time = t
         return self.cached_token
 
-    def _get_atom(self, url, count = None, older_first = False, continue_from = None, format = 'obj'):
+    def _get_atom(self, url, count = None, 
+                  older_first = False, continue_from = None, format = 'obj'):
         """
         Actually get ATOM feed. url is base url (one of the state or label urls).
         count is the articles count (default 20), ordering_back set to False means older
         else:
             return r
 
-    def _change_feed(self, feed_url, operation, title = None, add_tag = None, remove_tag = None):
+    def _change_feed(self, feed_url, operation,
+                     title = None, add_tag = None, remove_tag = None):
         """
         Subscribe or unsubscribe
         """
         header = {'User-agent' : SOURCE}
         header['Authorization'] = 'GoogleLogin auth=%s' % self.session_id
         if post_data is not None:
-            true_data = [ (key, value.encode('utf-8')) for key, value in post_data.iteritems() ]
+            true_data = [ (key, value.encode('utf-8')) 
+                          for key, value in post_data.iteritems() ]
             true_data = urllib.urlencode(true_data)
         else:
             true_data = None
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.