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

(FLK-E711) Equality comparison detected with singleton object #11

Open
hiancdtrsnm opened this issue Sep 13, 2020 · 0 comments
Open

(FLK-E711) Equality comparison detected with singleton object #11

hiancdtrsnm opened this issue Sep 13, 2020 · 0 comments

Comments

@hiancdtrsnm
Copy link
Owner

Description

Comparisons to the singleton objects, like True, False, and None, should be done with identity, not equality. Use “is” or “is not”. Identity checks are faster than equality checks. Bad: python value = fx() if value != None: print(value) Good: ```python value = fx() if value is not None: …

Occurrences

There is 1 occurrence of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/hiancdtrsnm/video-diet/issue/FLK-E711/occurrences/

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