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

Wrong for-else loop in test/test_check_addon.py #214

Open
H-KY opened this issue Mar 20, 2020 · 0 comments
Open

Wrong for-else loop in test/test_check_addon.py #214

H-KY opened this issue Mar 20, 2020 · 0 comments

Comments

@H-KY
Copy link

H-KY commented Mar 20, 2020

I couldn't understand when can the following for-else loop in tests/test_check_addon.py

for white_str in self.whitelist:  
    for value in records:  
        if white_str.lower() == value.lower():  
            break  
    else:  
        flag = False  
else:  
    flag = True  

ever set flag to False.
Was the intended loop:

flag = True
for white_str in self.whitelist:
    for value in records:
        if white_str.lower() == value.lower():
            break
    else:
        flag = False
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