This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
multipub/.pyenv/lib/python3.7/site-packages/pylint/test/functional/singleton_comparison.py
2019-02-09 02:45:25 -06:00

15 lines
514 B
Python

# pylint: disable=missing-docstring, invalid-name, misplaced-comparison-constant,literal-comparison, comparison-with-itself
x = 42
a = x is None
b = x == None # [singleton-comparison]
c = x == True # [singleton-comparison]
d = x == False # [singleton-comparison]
e = True == True # [singleton-comparison]
f = x is 1
g = 123 is "123"
h = None is x
i = None == x # [singleton-comparison]
j = x != True # [singleton-comparison]
j1 = x != False # [singleton-comparison]
j2 = x != None # [singleton-comparison]