From 3cf4514e2a9688a00244e31a4e85f1139b0fa2f7 Mon Sep 17 00:00:00 2001 From: Marek Marecki Date: Sat, 6 Jul 2013 00:13:59 +0200 Subject: [PATCH] Style fixes (make style-check) --- diaspy/models.py | 6 +++--- diaspy/people.py | 12 ++++++------ diaspy/streams.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) 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. -- 2.25.1