]> git.madduck.net Git - etc/vim.git/blob - tests/data/cases/nested_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 grammar for type alias support (#3949)
[etc/vim.git] / tests / data / cases / nested_stub.py
1 # flags: --pyi --preview
2 import sys
3
4 class Outer:
5     class InnerStub: ...
6     outer_attr_after_inner_stub: int
7     class Inner:
8         inner_attr: int
9     outer_attr: int
10
11 if sys.version_info > (3, 7):
12     if sys.platform == "win32":
13         assignment = 1
14         def function_definition(self): ...
15     def f1(self) -> str: ...
16     if sys.platform != "win32":
17         def function_definition(self): ...
18         assignment = 1
19     def f2(self) -> str: ...
20
21 # output
22
23 import sys
24
25 class Outer:
26     class InnerStub: ...
27     outer_attr_after_inner_stub: int
28
29     class Inner:
30         inner_attr: int
31
32     outer_attr: int
33
34 if sys.version_info > (3, 7):
35     if sys.platform == "win32":
36         assignment = 1
37         def function_definition(self): ...
38
39     def f1(self) -> str: ...
40     if sys.platform != "win32":
41         def function_definition(self): ...
42         assignment = 1
43
44     def f2(self) -> str: ...