PEP8'd content.py and subreddit.py
This commit is contained in:
@@ -7,9 +7,9 @@ from .exceptions import SubmissionError, SubredditError, AccountError
|
||||
from .helpers import humanize_timestamp, wrap_text, strip_subreddit_url
|
||||
|
||||
__all__ = ['SubredditContent', 'SubmissionContent']
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class BaseContent(object):
|
||||
|
||||
def get(self, index, n_cols):
|
||||
|
||||
@@ -17,11 +17,10 @@ from .curses_helpers import (Color, LoadScreen, add_line, get_arrow, get_gold,
|
||||
show_notification, prompt_input)
|
||||
|
||||
__all__ = ['history', 'SubredditController', 'SubredditPage']
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
history = load_history()
|
||||
|
||||
|
||||
@atexit.register
|
||||
def save_links():
|
||||
global history
|
||||
@@ -80,7 +79,7 @@ class SubredditPage(BasePage):
|
||||
try:
|
||||
self.content = SubredditContent.from_name(
|
||||
self.reddit, name, self.loader, query=query)
|
||||
except IndexError: # if there are no submissions
|
||||
except IndexError: # if there are no submissions
|
||||
show_notification(self.stdscr, ['No results found'])
|
||||
else:
|
||||
self.nav = Navigator(self.content.get)
|
||||
|
||||
Reference in New Issue
Block a user