From: Marek Marecki Date: Fri, 5 Jul 2013 22:13:59 +0000 (+0200) Subject: Style fixes (make style-check) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3cf4514e2a9688a00244e31a4e85f1139b0fa2f7;p=diaspy.git Style fixes (make style-check) --- diff --git a/diaspy/models.py b/diaspy/models.py index 0a7e3cd..b840e5f 100644 --- a/diaspy/models.py +++ b/diaspy/models.py @@ -12,7 +12,7 @@ MUST NOT import anything. class Aspect(): """This class represents an aspect. - + Class can be initialized by passing either an id and/or name as parameters. If both are missing, an exception will be raised. @@ -26,7 +26,7 @@ class Aspect(): self.id = self._findid() elif not id and not name: raise Exception("Aspect must be initialized with either an id or name") - + def _findname(self): """Finds name for aspect. """ @@ -37,7 +37,7 @@ class Aspect(): name = a['name'] break return name - + def _findid(self): """Finds id for aspect. """ diff --git a/diaspy/people.py b/diaspy/people.py index 2e94fab..aa4cf9f 100644 --- a/diaspy/people.py +++ b/diaspy/people.py @@ -12,11 +12,11 @@ class User(): The parameter fetch should be either 'posts', 'data' or 'none'. By default it is 'posts' which means in addition to user data, stream - will be fetched. If user has not posted yet diaspy will not be able - to extract the information from his/her posts. Since there is no official - way to do it we rely on user posts. If this will be the case user + will be fetched. If user has not posted yet diaspy will not be able + to extract the information from his/her posts. Since there is no official + way to do it we rely on user posts. If this will be the case user will be notified with appropriate exception message. - + If fetch is 'data', only user data will be fetched. If the user is not found, no exception will be returned. @@ -57,7 +57,7 @@ class User(): handle = self['handle'].split('@') pod, user = handle[1], handle[0] return (pod, user) - + def _finalize_data(self, data, names): final = {} for d, f in names: @@ -97,7 +97,7 @@ class User(): """ request = self._connection.get('people/{0}.json'.format(self['guid'])) self._postproc(request) - + def fetchprofile(self, protocol='https'): """Fetch user data using Diaspora handle. """ diff --git a/diaspy/streams.py b/diaspy/streams.py index 9b571f0..2a3c233 100644 --- a/diaspy/streams.py +++ b/diaspy/streams.py @@ -105,7 +105,7 @@ class Generic(): def update(self): """Updates stream. """ - self._update( self._obtain()) + self._update(self._obtain()) def fill(self): """Fills the stream with posts.