Skip to content

Commit

Permalink
PEP8-nazism part 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
kipe committed Mar 9, 2016
1 parent c12fcc9 commit 11972e5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyfibot/modules/module_matkahuolto.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def command_mh(bot, user, channel, args):
if dt.days > 0:
agestr.append('%dd' % dt.days)
secs = dt.seconds
hours, minutes, seconds = secs // 3600, secs // 60 % 60, secs % 60
hours, minutes = secs // 3600, secs // 60 % 60
if hours > 0:
agestr.append('%dh' % hours)
if minutes > 0:
Expand Down
2 changes: 1 addition & 1 deletion pyfibot/modules/module_posti.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def command_posti(bot, user, channel, args):
if dt.days > 0:
agestr.append('%dd' % dt.days)
secs = dt.seconds
hours, minutes, seconds = secs // 3600, secs // 60 % 60, secs % 60
hours, minutes = secs // 3600, secs // 60 % 60
if hours > 0:
agestr.append('%dh' % hours)
if minutes > 0:
Expand Down
2 changes: 1 addition & 1 deletion pyfibot/modules/module_thetvdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def command_tvdb(bot, user, channel, args):
all_episodes = sorted(all_episodes, key=itemgetter('firstaired'))
episode = all_episodes[-1]

## episode age in years and days
# episode age in years and days
td = now - datetime.strptime(episode['firstaired'], "%Y-%m-%d")
years, days = td.days // 365, td.days % 365
agestr = []
Expand Down
6 changes: 4 additions & 2 deletions pyfibot/modules/module_tvmaze.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
import pytz
from datetime import datetime


def command_ep(bot, user, channel, args):
"""Usage: ep <series name>"""
return command_maze(bot, user, channel, args)

def command_maze(bot, user, channel, args):

def command_maze(bot, user, channel, args):
try:
show = pytvmaze.get_show(show_name=args, embed='episodes')
except pytvmaze.exceptions.ShowNotFound:
Expand All @@ -28,7 +29,7 @@ def command_maze(bot, user, channel, args):
# episode has id and name, but no airstamp yet (not announced)
if not episode.airstamp:
continue

delta = relativedelta(parse(episode.airstamp), now)

# episode is in the past, stop searching
Expand Down Expand Up @@ -64,6 +65,7 @@ def command_maze(bot, user, channel, args):

bot.say(channel, msg.encode("UTF-8"))


def _ago(delta, exact=False):
delta_msg = []
if delta.years != 0:
Expand Down
3 changes: 1 addition & 2 deletions pyfibot/modules/module_urltitle.py
Original file line number Diff line number Diff line change
Expand Up @@ -1372,8 +1372,7 @@ def _handle_nettikone(url):

def _handle_hitbox(url):
"""http*://*hitbox.tv/*"""

# Blog and Help subdomains aren't implemented in Angular JS and works fine with default handler
# Blog and Help subdomains aren't implemented in Angular JS and works fine with default handler
if re.match(r"http://(help|blog)\.hitbox\.tv/.*", url):
return

Expand Down

0 comments on commit 11972e5

Please sign in to comment.