Skip to content

Commit

Permalink
more PEP8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
llazzaro committed Jul 11, 2015
1 parent 8d599e4 commit fe389b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion schedule/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
# Uncomment the next line to enable the admin:
'django.contrib.admin',
'schedule',
'django_nose',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)
Expand Down
7 changes: 3 additions & 4 deletions schedule/templatetags/scheduletags.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def __init__(self, content_object, distinction, context_var, create=False):
self.context_var = context_var

def render(self, context):
calendar = Calendar.objects.get_calendar_for_object(self.content_object.resolve(context), self.distinction)
Calendar.objects.get_calendar_for_object(self.content_object.resolve(context), self.distinction)
context[self.context_var] = Calendar.objects.get_calendar_for_object(self.content_object.resolve(context), self.distinction)
return ''

Expand Down Expand Up @@ -155,7 +155,6 @@ def render(self, context):
def do_get_or_create_calendar_for_object(parser, token):
contents = token.split_contents()
if len(contents) > 2:
tag_name = contents[0]
obj = contents[1]
if 'by' in contents:
by_index = contents.index('by')
Expand Down Expand Up @@ -284,8 +283,8 @@ def _cook_occurrences(period, occs, width, height):
o.top = int(height * ((o.real_start - period.start).seconds / diff_in_seconds))
o.height = int(height * ((o.real_end - o.real_start).seconds / diff_in_seconds))
else:
o.top = int(height * ((o.real_start - period.start).seconds / (24*60*60)))
o.height = int(height * ((o.real_end - o.real_start).seconds / (24*60*60)))
o.top = int(height * ((o.real_start - period.start).seconds / (24 * 60 * 60)))
o.height = int(height * ((o.real_end - o.real_start).seconds / (24 * 60 * 60)))
o.height = min(o.height, height - o.top) # trim what extends beyond the area
return display_occs

Expand Down

0 comments on commit fe389b4

Please sign in to comment.