File: err_123.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 (49 lines) | stat: -rw-r--r-- 609 bytes parent folder | download
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# these will match

_ = bool(True)
_ = bytes(b"hello world")
_ = complex(1j)
_ = dict({"a": 1})
_ = float(123.456)
_ = list([1, 2, 3])
_ = str("hello world")
_ = tuple((1, 2, 3))
_ = int(123)

a = True
_ = bool(a)

b = b"hello world"
_ = bytes(b)

c = 1j
_ = complex(c)

d = {"a": 1}
_ = dict(d)

e = 123.456
_ = float(e)

f = [1, 2, 3]
_ = list(f)

g = "hello world"
_ = str(g)

t = (1, 2, 3)
_ = tuple(t)


# these will not

_ = bool([])
_ = bytes(0xFF)
_ = complex(1)
_ = dict((("a", 1),))
_ = float(123)
_ = list((1, 2, 3))
_ = str(123)
_ = tuple([1, 2, 3])
_ = int("0xFF")
_ = dict(**d)  # noqa: FURB173