Removing unneeded imports
This commit is contained in:
@@ -368,22 +368,21 @@ class SubredditContent(BaseContent):
|
|||||||
return data
|
return data
|
||||||
|
|
||||||
class SubscriptionContent(BaseContent):
|
class SubscriptionContent(BaseContent):
|
||||||
def __init__(self, name, subscriptions, loader):
|
def __init__(self, subscriptions, loader):
|
||||||
self.name = name
|
self.name = "Subscriptions"
|
||||||
self._loader = loader
|
self._loader = loader
|
||||||
self._subscriptions = subscriptions
|
self._subscriptions = subscriptions
|
||||||
self._subscription_data = []
|
self._subscription_data = []
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_list(cls, reddit, loader):
|
def get_list(cls, reddit, loader):
|
||||||
display_name = "Subscriptions"
|
|
||||||
try:
|
try:
|
||||||
with loader():
|
with loader():
|
||||||
subscriptions = reddit.get_my_subreddits(limit=None)
|
subscriptions = reddit.get_my_subreddits(limit=None)
|
||||||
except praw.errors.APIException:
|
except praw.errors.APIException:
|
||||||
raise SubscriptionError()
|
raise SubscriptionError()
|
||||||
|
|
||||||
return cls(display_name, subscriptions, loader)
|
return cls(subscriptions, loader)
|
||||||
|
|
||||||
def get(self, index, n_cols=70):
|
def get(self, index, n_cols=70):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -5,10 +5,7 @@ import logging
|
|||||||
|
|
||||||
from .content import SubscriptionContent
|
from .content import SubscriptionContent
|
||||||
from .page import BasePage, Navigator, BaseController
|
from .page import BasePage, Navigator, BaseController
|
||||||
from .helpers import open_browser, open_editor
|
from .curses_helpers import (Color, LoadScreen, add_line)
|
||||||
from .curses_helpers import (Color, LoadScreen, get_arrow, get_gold, add_line,
|
|
||||||
show_notification)
|
|
||||||
from .docs import COMMENT_FILE
|
|
||||||
|
|
||||||
__all__ = ['SubscriptionController', 'SubscriptionPage']
|
__all__ = ['SubscriptionController', 'SubscriptionPage']
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|||||||
Reference in New Issue
Block a user