File: err_124.py

package info (click to toggle)
python-refurb 1.27.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,700 kB
  • sloc: python: 9,468; makefile: 40; sh: 6
file content (26 lines) | stat: -rw-r--r-- 471 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
x = y = z = 1

# these should match

_ = x == y and x == z
_ = x == y and y == z
_ = x == y and z == y
_ = x == y and x == z and True
_ = x == y and y == z and z == 1
_ = x == y and z == x

_ = x is None and y is None
_ = x is None and None is y
_ = None is x and y is None
_ = x is None and y is None and True


# these should not

_ = x == y and z == 1
_ = x == y or 1 == z
_ = x == y or 1 == z
_ = x == y or x <= z

_ = x is None and y is 1
_ = x is None or y is None