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

Remove repetitive return statement #5

Closed
0xjac opened this issue Jun 23, 2017 · 0 comments
Closed

Remove repetitive return statement #5

0xjac opened this issue Jun 23, 2017 · 0 comments

Comments

@0xjac
Copy link

0xjac commented Jun 23, 2017

return (0,0,events.event) is present is almost every if/elif block (L214-L303).

This version is a bit more readable and avoid the repetition:

if events.event == Status.CUSTOM:
    return something_custom
elif events.event == Status.OTHER_CUSTOM:
    return other_custom
return 0, 0, events.event

I believe return (0,0,NO_EVENT) should be placed in the except ValueError block referenced in #4

@0xjac 0xjac changed the title Remove repetitive return statement Remove repetitive return statement Jun 23, 2017
Minege added a commit that referenced this issue Jun 27, 2017
@Minege Minege closed this as completed in cc5ff6d Jul 3, 2017
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

No branches or pull requests

1 participant