Skip to content
This repository has been archived by the owner on Apr 14, 2020. It is now read-only.

flake8 check #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

flake8 check #60

wants to merge 1 commit into from

Conversation

cxhernandez
Copy link

Mostly aesthetics, but lines like this seemed incorrect:

if not field in self_cls.fields:

Any reason why it's not this?

if field not in self_cls.fields:

@peastman
Copy link

They're synonymous. Think of it as if not (field in self_cls.fields).

@cxhernandez
Copy link
Author

Ohhh— thanks! I was thinking not would be executed before in.

@mpharrigan
Copy link

The latter might be faster? it can short circuit

@peastman
Copy link

I don't think there would be any difference. Determining whether something is in a container is identical to determining whether it is not in the container. The only difference is inverting the return value.

@mpharrigan
Copy link

doh!

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.

3 participants