HarshCasper / Rotten-Scripts

Scripts that will make you go WOW!
MIT License
1.47k stars 491 forks source link

Use identity check for comparison to a singleton (#1) #1250

Closed karansthr closed 2 years ago

karansthr commented 2 years ago

Co-authored-by: deepsource-autofix[bot] 62050782+deepsource-autofix[bot]@users.noreply.github.com

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.

Type of change

Checklist:

ghost commented 2 years ago

Changes to your CodeSee Architecture Map:

View a CodeSee Map of these changes

Legend

CodeSee Map Legend

github-actions[bot] commented 2 years ago

@karansthr Hurray, your PR got merged 🥳. Thanks a bunch. Feel free to take another Issue.💖