-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pep8 for schedules app #23
Conversation
this commit does not introduce any logical changes
I've just created an issue so Iago could link the pull request later to an issue. #24 |
return None, None | ||
return closer_schedule, closer_date | ||
|
||
def __unicode__(self): | ||
return self.get_day_display() + ' - ' + self.start_hour.strftime('%H:%M') | ||
return ' - '.join( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, while writing some unit tests it emerged that this is not working. We need a sequence. I'll provide a fix. #23
fix committed |
@stefan-walluhn feel free to join the discussion at #24 |
@@ -78,9 +78,6 @@ def copy_ScheduleBoard(self, request, queryset): | |||
copy_ScheduleBoard.short_description = _("Make a Copy of calendar") | |||
|
|||
|
|||
admin.site.register(ScheduleBoard, ScheduleBoardAdmin) | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bunch admin registration at the end of module to not spread registration logic across the code
Schedule.objects.create( | ||
programme=programme, day=day, start_hour=datetime.time(9, 0, 0), type='L', | ||
schedule_board=schedule_board | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DRY. Repeating code -> loop
Thanks, looks good, sorry for the extra work. I revert the changes on the initial migration file because I don't see the point of modifying that file but let me know If you disagree. Cheers |
Hi Iago, thanks a lot for merging. This helps me a lot to work on a clean code path again. Looking onto a great collaboration. I think it's quite normal that distant co-working needs some time to find smooth processes, so let's stay in contact for further development. Best regards. |
Make schedules app PEP8 conform. This changeset also includes some very minor code changes, that does not affect any program logic, but helps to improve readability. I also deleted some legacy commented code fragments that led to confusion while reading the code.