PEP8'd helpers, history, page.py
This commit is contained in:
@@ -16,6 +16,7 @@ from .exceptions import ProgramError
|
||||
__all__ = ['open_browser', 'clean', 'wrap_text', 'strip_textpad',
|
||||
'strip_subreddit_url', 'humanize_timestamp', 'open_editor']
|
||||
|
||||
|
||||
def clean(string, n_cols=None):
|
||||
"""
|
||||
Required reading!
|
||||
@@ -49,6 +50,7 @@ def clean(string, n_cols=None):
|
||||
string = string.encode('utf-8')
|
||||
return string
|
||||
|
||||
|
||||
def open_editor(data=''):
|
||||
"""
|
||||
Open a temporary file using the system's default editor.
|
||||
@@ -124,6 +126,7 @@ def open_browser(url):
|
||||
webbrowser.open_new_tab(url)
|
||||
curses.doupdate()
|
||||
|
||||
|
||||
def wrap_text(text, width):
|
||||
"""
|
||||
Wrap text paragraphs to the given character width while preserving newlines.
|
||||
|
||||
Reference in New Issue
Block a user