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
|
from .helpers import humanize_timestamp, wrap_text, strip_subreddit_url
|
||||||
|
|
||||||
__all__ = ['SubredditContent', 'SubmissionContent']
|
__all__ = ['SubredditContent', 'SubmissionContent']
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class BaseContent(object):
|
class BaseContent(object):
|
||||||
|
|
||||||
def get(self, index, n_cols):
|
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)
|
show_notification, prompt_input)
|
||||||
|
|
||||||
__all__ = ['history', 'SubredditController', 'SubredditPage']
|
__all__ = ['history', 'SubredditController', 'SubredditPage']
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
history = load_history()
|
history = load_history()
|
||||||
|
|
||||||
|
|
||||||
@atexit.register
|
@atexit.register
|
||||||
def save_links():
|
def save_links():
|
||||||
global history
|
global history
|
||||||
@@ -80,7 +79,7 @@ class SubredditPage(BasePage):
|
|||||||
try:
|
try:
|
||||||
self.content = SubredditContent.from_name(
|
self.content = SubredditContent.from_name(
|
||||||
self.reddit, name, self.loader, query=query)
|
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'])
|
show_notification(self.stdscr, ['No results found'])
|
||||||
else:
|
else:
|
||||||
self.nav = Navigator(self.content.get)
|
self.nav = Navigator(self.content.get)
|
||||||
|
|||||||
Reference in New Issue
Block a user