Debian Codegraph @

tests/data/cases/fmtonoff6.py

raw
1 # Regression test for https://github.com/psf/black/issues/2478.
2 def foo():
3 arr = (
4 (3833567325051000, 5, 1, 2, 4229.25, 6, 0),
5 # fmt: off
6 )
7
8
9 # Regression test for https://github.com/psf/black/issues/3458.
10 dependencies = {
11 a: b,
12 # fmt: off
13 }
14
15
16 # Regression test for https://github.com/psf/black/issues/4511.
17 # fmt: off inside brackets with an f-string should not crash.
18 (
19 # fmt: off
20 f"""
21 """
22 # fmt: on
23 )
24
25 [
26 # fmt: off
27 f"{x}"
28 # fmt: on
29 ]
30
31 # Same as above but unindented inside brackets.
32 (
33 # fmt: off
34 f"""
35 """
36 # fmt: on
37 )
38
39 [
40 # fmt: off
41 f"{x}"
42 # fmt: on
43 ]
44
45 # output
46
47 # Regression test for https://github.com/psf/black/issues/2478.
48 def foo():
49 arr = (
50 (3833567325051000, 5, 1, 2, 4229.25, 6, 0),
51 # fmt: off
52 )
53
54
55 # Regression test for https://github.com/psf/black/issues/3458.
56 dependencies = {
57 a: b,
58 # fmt: off
59 }
60
61
62 # Regression test for https://github.com/psf/black/issues/4511.
63 # fmt: off inside brackets with an f-string should not crash.
64 (
65 # fmt: off
66 f"""
67 """
68 # fmt: on
69 )
70
71 [
72 # fmt: off
73 f"{x}"
74 # fmt: on
75 ]
76
77 # Same as above but unindented inside brackets.
78 (
79 # fmt: off
80 f"""
81 """
82 # fmt: on
83 )
84
85 [
86 # fmt: off
87 f"{x}"
88 # fmt: on
89 ]