]> git.madduck.net Git - etc/vim.git/blob - tests/data/cases/stub.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Fix merging implicit multiline strings that have inline comments (#3956)
[etc/vim.git] / tests / data / cases / stub.py
1 # flags: --pyi
2 X: int
3
4 def f(): ...
5
6
7 class D: 
8     ...
9
10
11 class C:
12     ...
13
14 class B:
15     this_lack_of_newline_should_be_kept: int
16     def b(self) -> None: ...
17
18     but_this_newline_should_also_be_kept: int
19
20 class A:
21     attr: int
22     attr2: str
23
24     def f(self) -> int:
25         ...
26
27     def g(self) -> str: ...
28
29
30
31 def g():
32     ...
33
34 def h(): ...
35
36 if sys.version_info >= (3, 8):
37     class E:
38         def f(self): ...
39     class F:
40
41         def f(self): ...
42     class G: ...
43     class H: ...
44 else:
45     class I: ...
46     class J: ...
47     def f(): ...
48
49     class K:
50         def f(self): ...
51     def f(): ...
52
53 class Nested:
54     class dirty: ...
55     class little: ...
56     class secret:
57         def who_has_to_know(self): ...
58     def verse(self): ...
59
60 class Conditional:
61     def f(self): ...
62     if sys.version_info >= (3, 8):
63         def g(self): ...
64     else:
65         def g(self): ...
66     def h(self): ...
67     def i(self): ...
68     if sys.version_info >= (3, 8):
69         def j(self): ...
70     def k(self): ...
71     if sys.version_info >= (3, 8):
72         class A: ...
73         class B: ...
74         class C:
75             def l(self): ...
76             def m(self): ...
77
78
79 # output
80 X: int
81
82 def f(): ...
83
84 class D: ...
85 class C: ...
86
87 class B:
88     this_lack_of_newline_should_be_kept: int
89     def b(self) -> None: ...
90
91     but_this_newline_should_also_be_kept: int
92
93 class A:
94     attr: int
95     attr2: str
96
97     def f(self) -> int: ...
98     def g(self) -> str: ...
99
100 def g(): ...
101 def h(): ...
102
103 if sys.version_info >= (3, 8):
104     class E:
105         def f(self): ...
106
107     class F:
108         def f(self): ...
109
110     class G: ...
111     class H: ...
112
113 else:
114     class I: ...
115     class J: ...
116
117     def f(): ...
118
119     class K:
120         def f(self): ...
121
122     def f(): ...
123
124 class Nested:
125     class dirty: ...
126     class little: ...
127
128     class secret:
129         def who_has_to_know(self): ...
130
131     def verse(self): ...
132
133 class Conditional:
134     def f(self): ...
135     if sys.version_info >= (3, 8):
136         def g(self): ...
137     else:
138         def g(self): ...
139
140     def h(self): ...
141     def i(self): ...
142     if sys.version_info >= (3, 8):
143         def j(self): ...
144
145     def k(self): ...
146     if sys.version_info >= (3, 8):
147         class A: ...
148         class B: ...
149
150         class C:
151             def l(self): ...
152             def m(self): ...