diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-10-06 16:52:53 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-10-06 16:52:53 +0200 |
| commit | 2b1e8411ab5eaa7e1349b78d03270ab02ae2950d (patch) | |
| tree | ed914cbf8964bbe26ba28e80589f4c289b3fac3a /client/modules/HN.py | |
| parent | 890a5798fcf7f9b9dc06529aa4bc7fe903d7ca1a (diff) | |
| download | jasper-client-2b1e8411ab5eaa7e1349b78d03270ab02ae2950d.tar.gz jasper-client-2b1e8411ab5eaa7e1349b78d03270ab02ae2950d.zip | |
Fix flake8 style nits
Diffstat (limited to 'client/modules/HN.py')
| -rw-r--r-- | client/modules/HN.py | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/client/modules/HN.py b/client/modules/HN.py index ec7ecef..d205829 100644 --- a/client/modules/HN.py +++ b/client/modules/HN.py @@ -51,7 +51,8 @@ def handle(text, mic, profile): Arguments: text -- user-input, typically transcribed speech mic -- used to interact with the user (for both input and output) - profile -- contains information related to the user (e.g., phone number) + profile -- contains information related to the user (e.g., phone + number) """ mic.say("Pulling up some stories.") stories = getTopStories(maxResults=3) @@ -93,17 +94,24 @@ def handle(text, mic, profile): if profile['prefers_email']: body += article_link else: - if not app_utils.emailUser(profile, SUBJECT="", BODY=article_link): - mic.say( - "I'm having trouble sending you these articles. Please make sure that your phone number and carrier are correct on the dashboard.") + if not app_utils.emailUser(profile, SUBJECT="", + BODY=article_link): + mic.say("I'm having trouble sending you these " + + "articles. Please make sure that your " + + "phone number and carrier are correct " + + "on the dashboard.") return # if prefers email, we send once, at the end if profile['prefers_email']: body += "</ul>" - if not app_utils.emailUser(profile, SUBJECT="From the Front Page of Hacker News", BODY=body): - mic.say( - "I'm having trouble sending you these articles. Please make sure that your phone number and carrier are correct on the dashboard.") + if not app_utils.emailUser(profile, + SUBJECT="From the Front Page of " + + "Hacker News", + BODY=body): + mic.say("I'm having trouble sending you these articles. " + + "Please make sure that your phone number and " + + "carrier are correct on the dashboard.") return mic.say("All done.") @@ -113,12 +121,12 @@ def handle(text, mic, profile): if not profile['prefers_email'] and profile['phone_number']: mic.say("Here are some front-page articles. " + - all_titles + ". Would you like me to send you these? If so, which?") + all_titles + ". Would you like me to send you these? " + + "If so, which?") handleResponse(mic.activeListen()) else: - mic.say( - "Here are some front-page articles. " + all_titles) + mic.say("Here are some front-page articles. " + all_titles) def isValid(text): |
