Skip to content

Conversation

@Jitsusama
Copy link

As per issue #1236, this PR replaces the else clause on the for loop with a default return False statement. The unit tests for this class continue to pass. I ran pytest against the whole project and found 2 errors when running locally on my MacBook with Python3.6, but at first glance they appear to be unrelated.

I also moved a conditional into a named local variable that to me made the purpose of the block of code that I was changing more explicit.

As the for loop does not involve break statements, the else statement
is spurious and can be replaced by a default return statement.
As I was reading through this code logic, it took me a while to figure
out what the conditional was actually checking. This minor change gives
the conditional a name, which for me makes its purpose more explicit.
@Eldinnie
Copy link
Member

Eldinnie commented Oct 2, 2018

Hi.

Thanks for your contribution. It's a duplicate of #1239 but it wil count towards your t-shirt nonetheless :D
Good luck

@Eldinnie Eldinnie closed this Oct 2, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Aug 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants