From 4cf61ad5fedb4115fd671d69585542551eba07a4 Mon Sep 17 00:00:00 2001 From: os Date: Fri, 12 Sep 2014 08:46:19 +1000 Subject: [PATCH] Minor refactoring. --- slacker/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/slacker/__init__.py b/slacker/__init__.py index be68533..944fc4a 100644 --- a/slacker/__init__.py +++ b/slacker/__init__.py @@ -276,12 +276,12 @@ def list(self): class Presence(BaseAPI): - PRESENCE_AWAY = 'away' - PRESENCE_ACTIVE = 'active' - PRESENCE_TYPES = (PRESENCE_AWAY, PRESENCE_ACTIVE) + AWAY = 'away' + ACTIVE = 'active' + TYPES = (AWAY, ACTIVE) def set(self, presence): - assert presence in self.PRESENCE_TYPES, 'Invalid presence type' + assert presence in Presence.TYPES, 'Invalid presence type' return self.post('presence.set', params={'presence': presence})