Skip to content
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

Merged
merged 6 commits into from
Mar 7, 2016
Merged

pep8 for schedules app #23

merged 6 commits into from
Mar 7, 2016

Conversation

stefan-walluhn
Copy link

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.

@txenoo
Copy link
Contributor

txenoo commented Mar 1, 2016

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(
Copy link
Author

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

@stefan-walluhn
Copy link
Author

fix committed

@iago1460
Copy link
Owner

iago1460 commented Mar 6, 2016

@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)


Copy link
Author

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
)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DRY. Repeating code -> loop

@iago1460
Copy link
Owner

iago1460 commented Mar 7, 2016

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

@iago1460 iago1460 merged commit 108ee6f into iago1460:master Mar 7, 2016
@stefan-walluhn
Copy link
Author

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.

@stefan-walluhn stefan-walluhn deleted the pep8 branch May 17, 2016 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants